From 5711816eab59790cbc00fbf5fc5691257aebddfc Mon Sep 17 00:00:00 2001 From: Tatham Oddie Date: Sun, 19 May 2024 09:34:06 +0200 Subject: [PATCH] Introduce VS Code debug config This allows you to be editing a source script in VS Code, then just press F5 to run it through the test script with the debugger attached. Supports Python and ICS-based sources. --- .vscode/launch.json | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..958b68fc --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,57 @@ +{ + // 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": "Test All Sources", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py", + "console": "integratedTerminal", + "args": [ + "-t" + ] + }, + { + "name": "Test Current Source (.py)", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py", + "console": "integratedTerminal", + "args": [ + "-s", + "${fileBasenameNoExtension}", + "-l", + "-i", + "-t" + ] + }, + { + "name": "Test All ICS Sources", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py", + "console": "integratedTerminal", + "args": [ + "-I", + "-t" + ] + }, + { + "name": "Test Current ICS Source (.yaml)", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/custom_components/waste_collection_schedule/waste_collection_schedule/test/test_sources.py", + "console": "integratedTerminal", + "args": [ + "-y", + "${fileBasenameNoExtension}", + "-l", + "-i", + "-t" + ] + } + ] +} \ No newline at end of file