Skip to content

Commit 0a0833b

Browse files
committed
Improve the launch template
1 parent f5dbcb7 commit 0a0833b

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.vscode/launch.template.json

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
// Rename this file 'launch.json' or merge its
2-
// contents into your existing configurations.
1+
/*
2+
3+
Copy this file into '.vscode/launch.json' or merge its
4+
contents into your existing configurations.
5+
6+
If you want to remove the errors in comments for all JSON
7+
files, add this to your settings in ~/.vscode/User/settings.json
8+
9+
"files.associations": {
10+
"*.json": "jsonc"
11+
},
12+
13+
*/
14+
315
{
416
// Use IntelliSense to learn about possible attributes.
517
// Hover to view descriptions of existing attributes.
@@ -10,7 +22,7 @@
1022
"type": "node",
1123
"protocol": "inspector",
1224
"request": "launch",
13-
"name": "Mocha Tests (currently opened test)",
25+
"name": "Mocha Tests (currently opened test)",
1426
"runtimeArgs": ["--nolazy"],
1527
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
1628
"args": [
@@ -20,6 +32,8 @@
2032
"--colors",
2133
"built/local/run.js",
2234
"-f",
35+
// You can change this to be the name of a specific test file (without the file extension)
36+
// to consistently launch the same test
2337
"${fileBasenameNoExtension}",
2438
"--skip-percent",
2539
"0"
@@ -34,6 +48,13 @@
3448
"outFiles": [
3549
"${workspaceRoot}/built/local/run.js"
3650
]
51+
},
52+
{
53+
// See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code
54+
"type": "node",
55+
"request": "attach",
56+
"name": "Attach to VS Code TS Server via Port",
57+
"processId": "${command:PickProcess}"
3758
}
3859
]
39-
}
60+
}

0 commit comments

Comments
 (0)