debug: improve attach to vscode config

This commit is contained in:
Connor Peet 2020-11-02 15:15:14 -08:00
parent 6acc9ff1ee
commit 296aa89012
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD

51
.vscode/launch.json vendored
View file

@ -200,7 +200,8 @@
"request": "attach",
"name": "Attach to VS Code",
"browserAttachLocation": "workspace",
"port": 9222
"port": 9222,
"perScriptSourcemaps": "yes"
},
{
"type": "pwa-chrome",
@ -377,7 +378,7 @@
}
},
{
"type": "node",
"type": "pwa-node",
"request": "launch",
"name": "Run Unit Tests",
"program": "${workspaceFolder}/test/unit/electron/index.js",
@ -396,6 +397,41 @@
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"cascadeTerminateToConfigurations": [
"Attach to VS Code"
],
"env": {
"MOCHA_COLORS": "true"
},
"presentation": {
"hidden": true
}
},
{
"type": "pwa-node",
"request": "launch",
"name": "Run Unit Tests For Current File",
"program": "${workspaceFolder}/test/unit/electron/index.js",
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe"
},
"linux": {
"runtimeExecutable": "${workspaceFolder}/.build/electron/code-oss"
},
"cascadeTerminateToConfigurations": [
"Attach to VS Code"
],
"outputCapture": "std",
"args": [
"--remote-debugging-port=9222",
"--run",
"${relativeFile}"
],
"cwd": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"env": {
"MOCHA_COLORS": "true"
},
@ -482,6 +518,17 @@
"group": "1_vscode",
"order": 2
}
},
{
"name": "Debug Unit Tests (Current File)",
"configurations": [
"Attach to VS Code",
"Run Unit Tests For Current File"
],
"presentation": {
"group": "1_vscode",
"order": 2
}
}
]
}