From 0a0833b376c6b0b1eb89ae4c7772520ecc81d02e Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Fri, 18 Oct 2019 16:35:58 -0400 Subject: [PATCH] Improve the launch template --- .vscode/launch.template.json | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.template.json b/.vscode/launch.template.json index 4ba7f8ab880..ede5febb3bf 100644 --- a/.vscode/launch.template.json +++ b/.vscode/launch.template.json @@ -1,5 +1,17 @@ -// Rename this file 'launch.json' or merge its -// contents into your existing configurations. +/* + + Copy this file into '.vscode/launch.json' or merge its + contents into your existing configurations. + + If you want to remove the errors in comments for all JSON + files, add this to your settings in ~/.vscode/User/settings.json + + "files.associations": { + "*.json": "jsonc" + }, + +*/ + { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. @@ -10,7 +22,7 @@ "type": "node", "protocol": "inspector", "request": "launch", - "name": "Mocha Tests (currently opened test)", + "name": "Mocha Tests (currently opened test)", "runtimeArgs": ["--nolazy"], "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", "args": [ @@ -20,6 +32,8 @@ "--colors", "built/local/run.js", "-f", + // You can change this to be the name of a specific test file (without the file extension) + // to consistently launch the same test "${fileBasenameNoExtension}", "--skip-percent", "0" @@ -34,6 +48,13 @@ "outFiles": [ "${workspaceRoot}/built/local/run.js" ] + }, + { + // See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code + "type": "node", + "request": "attach", + "name": "Attach to VS Code TS Server via Port", + "processId": "${command:PickProcess}" } ] -} \ No newline at end of file +}