From 6344c5aa7f4ae94bd61b3927a72de1a75795caa4 Mon Sep 17 00:00:00 2001 From: Victor Morand <144000266+VictorMorand@users.noreply.github.com> Date: Thu, 10 Jul 2025 09:57:21 +0200 Subject: [PATCH 1/3] Update faq.md for task debugging --- docs/faq.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index c37eb9d1..df3a718a 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -24,3 +24,33 @@ task.instance(context).execute() ``` The main problem with this approach is that resources are shared between experimaestro and the task + +### How to Debug a failed task ? +If a task failed, you can rerun it with [debugpy](https://github.com/microsoft/debugpy). + +#### Using vsCode +If the task is already generated, you can run it with the [python debugger](https://code.visualstudio.com/docs/python/debugging) directly within vsCode. +- open the task python file `.../HASHID/task_name.py`. +- Run the dubugger Using the following configuration: + +In `.vscode/launch.json` : +```json + { + "name": "Python: XPM Task", + "type": "debugpy", + "request": "launch", + "module": "experimaestro", + "console": "integratedTerminal", + "justMyCode": false, + "args": [ + "run", + "params.json" + ], + // "python": "${workspaceFolder}/.venv/bin/python", + "cwd": "${fileDirname}", + "env": { + "CUDA_VISIBLE_DEVICES": "1", + } +} +- NOTE: if the task needs GPU support, you may need to open VS-Code on a node with access to a GPU. +``` From 0ad75215820578ec1e02c60f0f669dc59a32111d Mon Sep 17 00:00:00 2001 From: Victor Morand <144000266+VictorMorand@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:00:18 +0200 Subject: [PATCH 2/3] typo --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index df3a718a..a95c3039 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -52,5 +52,5 @@ In `.vscode/launch.json` : "CUDA_VISIBLE_DEVICES": "1", } } -- NOTE: if the task needs GPU support, you may need to open VS-Code on a node with access to a GPU. ``` +- NOTE: if the task needs GPU support, you may need to open VS-Code on a node with access to a GPU. From 07d27ecaaa561f32a7fb8bd6f7a82c96ca0b6a27 Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Thu, 10 Jul 2025 10:17:53 +0200 Subject: [PATCH 3/3] Update faq.md Use json5 to handle comments --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index a95c3039..8218d2f7 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -34,7 +34,7 @@ If the task is already generated, you can run it with the [python debugger](http - Run the dubugger Using the following configuration: In `.vscode/launch.json` : -```json +```json5 { "name": "Python: XPM Task", "type": "debugpy",