diff options
Diffstat (limited to '.vscode')
-rw-r--r-- | .vscode/launch.json | 36 | ||||
-rw-r--r-- | .vscode/settings.json | 4 | ||||
-rw-r--r-- | .vscode/tasks.json | 41 |
3 files changed, 75 insertions, 6 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index c598750f..75ee1f7a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,6 +11,14 @@ "Server", "Extension (VSCode)" ] + }, + { + "name": "Server + Tests (VSCode)", + "stopAll": true, + "configurations": [ + "Server", + "Tests (VSCode)" + ] } ], "configurations": [ @@ -34,6 +42,7 @@ "request": "launch", "cwd": "${workspaceFolder}/extension", "args": [ + // Pass a directory to manually test in "${workspaceFolder}/extension/manual-testing-sandbox", "--extensionDevelopmentPath=${workspaceFolder}/extension", ], @@ -45,5 +54,32 @@ "CONTINUE_SERVER_URL": "http://localhost:8001" } }, + // Has to be run after starting the server (separately or using the compound configuration) + { + "name": "Tests (VSCode)", + "type": "extensionHost", + "request": "launch", + "cwd": "${workspaceFolder}/extension", + "runtimeExecutable": "${execPath}", + "args": [ + // Pass a directory to run tests in + "${workspaceFolder}/extension/manual-testing-sandbox", + "--extensionDevelopmentPath=${workspaceFolder}/extension", + "--extensionTestsPath=${workspaceFolder}/extension/out/test-runner/mochaRunner" + ], + "outFiles": [ + // Allows setting breakpoints in test suites across the /src folder + "${workspaceFolder}/extension/out/test-suites/**/*.js", + // Allows setting breakpoints in mocha test runner file + "${workspaceFolder}/extension/out/test-runner/**/*.js" + ], + "internalConsoleOptions": "openOnSessionStart", + "preLaunchTask": "vscode-extension:tests:build", + "env": { + "CONTINUE_SERVER_URL": "http://localhost:8001", + // Avoid timing out when stopping on breakpoints during debugging in VSCode + "MOCHA_TIMEOUT": "0", + }, + } ] }
\ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 2195200a..856240e5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "python.defaultInterpreterPath": "${workspaceFolder}/continuedev/.venv/bin/python", -}
\ No newline at end of file + "python.defaultInterpreterPath": "${workspaceFolder}/continuedev/.venv/bin/python3" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 64e18f28..c15edf0d 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,7 @@ { "version": "2.0.0", "tasks": [ + // Compile and bundle the extension { "label": "vscode-extension:build", "dependsOn": [ @@ -38,10 +39,9 @@ // This will be useful for preventing debugging if there are compile errors { "label": "vscode-extension:tsc", - "type": "shell", - "command": "echo lol", - // "script": "tsc", - // "path": "extension", + "type": "npm", + "script": "tsc", + "path": "extension", "problemMatcher": [ "$tsc" ], @@ -50,6 +50,39 @@ "clear": true, }, }, + // + // Compile and bundle tests + { + "label": "vscode-extension:tests:build", + "dependsOn": [ + // Build the extension + "vscode-extension:build", + // To detect compile errors - this type checks both the extension and the tests + "vscode-extension:tsc", + "vscode-extension:tests:esbuild" + ], + }, + { + "label": "vscode-extension:tests:esbuild", + "type": "npm", + "script": "build-test", + "path": "extension", + "problemMatcher": [ + { + "pattern": [ + { + "regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + ] + } + ] + }, + // // Install or update all dependencies for all projects in the monrepo { "label": "install-all-dependencies", |