From b86e02e183648efd8bb2359159208d13d10aa5c1 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Fri, 22 Sep 2023 18:44:05 +0200 Subject: [PATCH] vscode debugging integration added + README updated --- pkgs/clan-cli/.vscode/launch.json | 16 ++++++++++++++++ pkgs/clan-cli/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/clan-cli/.vscode/launch.json diff --git a/pkgs/clan-cli/.vscode/launch.json b/pkgs/clan-cli/.vscode/launch.json new file mode 100644 index 00000000..8dc92444 --- /dev/null +++ b/pkgs/clan-cli/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Clan Webui", + "type": "python", + "request": "launch", + "module": "clan_cli.webui", + "justMyCode": true, + "args": [ "--reload", "--no-open", "--log-level", "debug" ] + } + ] +} \ No newline at end of file diff --git a/pkgs/clan-cli/README.md b/pkgs/clan-cli/README.md index df9c5090..ca831a6d 100644 --- a/pkgs/clan-cli/README.md +++ b/pkgs/clan-cli/README.md @@ -28,6 +28,30 @@ To start a local developement environment instead, use the `--dev` flag: This will spawn two webserver, a python one to for the api and a nodejs one that rebuilds the ui on the fly. +## Run webui directly +Useful for vscode run and debug option +```bash +python -m clan_cli.webui --reload --no-open +``` + +Add this `launch.json` to your .vscode directory to have working breakpoints in your vscode editor. +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Clan Webui", + "type": "python", + "request": "launch", + "module": "clan_cli.webui", + "justMyCode": true, + "args": [ "--reload", "--no-open", "--log-level", "debug" ] + } + ] +} +``` + + ## Run locally single-threaded for debugging By default tests run in parallel using pytest-parallel.