Fixed debugging of command-line tool.

This commit is contained in:
Eric Traut 2019-03-26 23:53:50 -07:00
parent 64708ce30b
commit 01204a1db2
2 changed files with 8 additions and 2 deletions

4
.vscode/launch.json vendored
View File

@ -5,10 +5,10 @@
"name": "Pyright CLI",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/index.js",
"program": "${workspaceRoot}/index.debug.js",
"protocol": "inspector",
"cwd": "${workspaceRoot}",
"preLaunchTask": "npm: build:pyright",
"preLaunchTask": "npm: build:analyzer",
"args": [
"-p",
"${workspaceRoot}/../brain",

6
index.debug.js Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env node
// Stash the base directory into a global variable.
global.__rootDirectory = __dirname + '/dist/';
require('./client/server/pyright')