Skip to content

Commit c5619fe

Browse files
DBosleychuckjaz
authored andcommitted
Aligning project with the Microsoft example to fix local debugging (#139)
1 parent 88f2bd1 commit c5619fe

File tree

5 files changed

+42
-10
lines changed

5 files changed

+42
-10
lines changed

client/.vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// A launch configuration that launches the extension inside a new window
22
{
33
"version": "0.1.0",
4-
"configurations": [
5-
{
4+
"configurations": [{
65
"name": "Launch Extension",
76
"type": "extensionHost",
87
"request": "launch",
98
"runtimeExecutable": "${execPath}",
10-
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
11-
"stopOnEntry": false,
12-
"sourceMaps": true,
13-
"outDir": "${workspaceRoot}/out"
9+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
10+
"stopOnEntry": false,
11+
"sourceMaps": true,
12+
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
13+
"preLaunchTask": "npm"
1414
}
1515
]
1616
}

client/.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3+
"typescript.tsdk": "./node_modules/typescript/lib",
34
"editor.tabSize": 2,
45
"editor.insertSpaces": true,
56
"editor.useTabStops": false

client/.vscode/tasks.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Available variables which can be used inside of strings.
2+
// ${workspaceRoot}: the root folder of the team
3+
// ${file}: the current opened file
4+
// ${fileBasename}: the current opened file's basename
5+
// ${fileDirname}: the current opened file's dirname
6+
// ${fileExtname}: the current opened file's extension
7+
// ${cwd}: the current working directory of the spawned process
8+
9+
// A task runner that calls a custom npm script that compiles the extension.
10+
{
11+
"version": "0.1.0",
12+
13+
// we want to run npm
14+
"command": "npm",
15+
16+
// the command is a shell script
17+
"isShellCommand": true,
18+
19+
// show the output window only if unrecognized errors occur.
20+
"showOutput": "silent",
21+
22+
// we run the custom script "compile" as defined in package.json
23+
"args": ["run", "compile", "--loglevel", "silent"],
24+
25+
// The tsc compiler is started in watching mode
26+
"isBackground": true,
27+
28+
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29+
"problemMatcher": "$tsc-watch"
30+
}

client/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function activate(context: ExtensionContext) {
77
// The server is implemented in node
88
let serverModule = context.asAbsolutePath(path.join('server', 'server.js'));
99
// The debug options for the server
10-
let debugOptions = { execArgv: ["--nolazy", "--debug=6004"] };
10+
let debugOptions = { execArgv: ["--nolazy", "--debug=6009"] };
1111

1212
// If the extension is launched in debug mode then the debug server options are used
1313
// Otherwise the run options are used

server/.vscode/launch.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
"name": "Attach",
66
"type": "node",
77
"request": "attach",
8-
"port": 6004,
8+
"port": 6009,
99
"sourceMaps": true,
10-
"outDir": "${workspaceRoot}/../client/server"
10+
"outFiles": [ "${workspaceRoot}/../client/server/**/*.js" ],
11+
"protocol": "legacy"
1112
},
1213
{
1314
"name": "Attach (tests)",
1415
"type": "node",
1516
"request": "attach",
1617
"port": 5858,
1718
"sourceMaps": true,
18-
"outDir": "${workspaceRoot}/../client/server"
19+
"outFiles": [ "${workspaceRoot}/../client/server/**/*.js" ]
1920
}
2021
]
2122
}

0 commit comments

Comments
 (0)