feat(vscode): add Debug Spec to debug .spec.ts files directly (#129)
This commit is contained in:
committed by
Jason Dreyzehner
parent
fd420b8f09
commit
310502dfb1
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"configurations": [{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Debug Project",
|
||||
@@ -26,22 +25,11 @@
|
||||
"console": "externalTerminal"
|
||||
},
|
||||
{
|
||||
/// Usage: set appropriate breakpoints in a *.spec.ts file, then open the
|
||||
// respective *.spec.js file to run this task. Once a breakpoint is hit,
|
||||
// the debugger will open the source *.spec.ts file for debugging.
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Debug Visible Compiled Spec",
|
||||
"program": "${workspaceFolder}/node_modules/ava/profile.js",
|
||||
"args": [
|
||||
"${file}"
|
||||
// TODO: VSCode's launch.json variable substitution
|
||||
// (https://code.visualstudio.com/docs/editor/variables-reference)
|
||||
// doesn't quite allow us to go from:
|
||||
// `./src/path/to/file.ts` to `./build/main/path/to/file.js`
|
||||
// so the user has to navigate to the compiled file manually. (Close:)
|
||||
// "${workspaceFolder}/build/main/lib/${fileBasenameNoExtension}.js"
|
||||
],
|
||||
"name": "Debug Spec",
|
||||
"program": "${workspaceRoot}/.vscode/debug-ts.js",
|
||||
"args": ["${file}"],
|
||||
"skipFiles": ["<node_internals>/**/*.js"],
|
||||
// Consider using `npm run watch` or `yarn watch` for faster debugging
|
||||
// "preLaunchTask": "npm: build",
|
||||
@@ -93,4 +81,4 @@
|
||||
"runtimeArgs": ["--nolazy"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user