Adds an end-to-end Python debug workflow for the extension. Includes a new prepare-debug.ps1 script and a VS Code task. Extends the Python server and extension to coordinate a debug session and safe startup. - Add prepare-debug.ps1 and a VS Code task to build the debug bundle - Enable Python debug wiring in the server and tests - Ensure a single stable Python debug session during startup
98 lines
3.5 KiB
JSON
98 lines
3.5 KiB
JSON
// A launch configuration that compiles the extension and then opens it inside a new window
|
|
// 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": "Run Extension",
|
|
"type": "extensionHost",
|
|
"request": "launch",
|
|
"runtimeExecutable": "${execPath}",
|
|
"args": [
|
|
"--extensionDevelopmentPath=${env:TEMP}/nx-post-support-vscode-debug",
|
|
"${env:TEMP}/nx-post-support-vscode-debug",
|
|
"${env:TEMP}/nx-post-support-vscode-debug/test/test.tcl"
|
|
],
|
|
"cwd": "${env:TEMP}/nx-post-support-vscode-debug",
|
|
"outFiles": ["${env:TEMP}/nx-post-support-vscode-debug/dist/**/*.js"],
|
|
"sourceMaps": true,
|
|
"resolveSourceMapLocations": [
|
|
"${env:TEMP}/nx-post-support-vscode-debug/dist/**/*.js",
|
|
"!**/node_modules/**"
|
|
],
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"autoAttachChildProcesses": true,
|
|
"preLaunchTask": "NX Post Support: Compile Debug"
|
|
},
|
|
{
|
|
"name": "Python Attach",
|
|
"type": "debugpy",
|
|
"request": "attach",
|
|
"processId": "${command:pickProcess}",
|
|
"justMyCode": false,
|
|
"presentation": {
|
|
"hidden": false,
|
|
"group": "",
|
|
"order": 3
|
|
}
|
|
},
|
|
{
|
|
"name": "Debug Extension (hidden)",
|
|
"type": "extensionHost",
|
|
"request": "launch",
|
|
"runtimeExecutable": "${execPath}",
|
|
"args": [
|
|
"--extensionDevelopmentPath=${env:TEMP}/nx-post-support-vscode-debug",
|
|
"${env:TEMP}/nx-post-support-vscode-debug",
|
|
"${env:TEMP}/nx-post-support-vscode-debug/test/test.tcl"
|
|
],
|
|
"cwd": "${env:TEMP}/nx-post-support-vscode-debug",
|
|
"outFiles": ["${env:TEMP}/nx-post-support-vscode-debug/dist/**/*.js"],
|
|
"sourceMaps": true,
|
|
"resolveSourceMapLocations": [
|
|
"${env:TEMP}/nx-post-support-vscode-debug/dist/**/*.js",
|
|
"!**/node_modules/**"
|
|
],
|
|
"skipFiles": ["<node_internals>/**"],
|
|
"env": {
|
|
"USE_DEBUGPY": "True",
|
|
"NXPS_DEBUG_HOST": "127.0.0.1",
|
|
"NXPS_DEBUG_PORT": "5678"
|
|
},
|
|
"presentation": {
|
|
"hidden": true,
|
|
"group": "",
|
|
"order": 4
|
|
}
|
|
},
|
|
{
|
|
"name": "Python debug server (hidden)",
|
|
"type": "debugpy",
|
|
"request": "attach",
|
|
"listen": { "host": "127.0.0.1", "port": 5678 },
|
|
"justMyCode": false,
|
|
"logToFile": true,
|
|
"presentation": {
|
|
"hidden": true,
|
|
"group": "",
|
|
"order": 4
|
|
}
|
|
}
|
|
],
|
|
"compounds": [
|
|
{
|
|
"name": "Debug Extension and Python",
|
|
"configurations": ["Python debug server (hidden)", "Debug Extension (hidden)"],
|
|
"stopAll": true,
|
|
"preLaunchTask": "NX Post Support: Compile Debug",
|
|
"presentation": {
|
|
"hidden": false,
|
|
"group": "",
|
|
"order": 1
|
|
}
|
|
}
|
|
]
|
|
}
|