mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-16 19:30:26 +03:00
* launch.json CLI debug that bypasses webpack I got a bit irritated in my edit-build-debug inner loop with the time to run webpack. This commit adds a new launch target called "Pyright CLI (pyright-internal)" which bypasses webpack and just runs the package straight from the packages/pyright-internal/out directory where tsc has built it. * fix outFiles directive The VSCode docs say about outFiles: > By default, VS Code will search your entire workspace, excluding node_modules, for sourcemaps. In large workspaces, this search might be slow. You can configure the locations where VS Code will search for source maps by setting the outFiles attribute in your launch.json. I guess this is the right change to make? it didn't make any difference in VSCode debugger's ability to hit breakpoints, though. --------- Co-authored-by: Eric Traut <eric@traut.com>
136 lines
5.4 KiB
JSON
136 lines
5.4 KiB
JSON
{
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "Pyright CLI",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"program": "${workspaceRoot}/packages/pyright/index.js",
|
|
"preLaunchTask": "npm: build:cli:dev",
|
|
"args": [
|
|
"--verifytypes",
|
|
"pandas.core.reshape.concat",
|
|
],
|
|
"internalConsoleOptions": "openOnSessionStart",
|
|
"outFiles": [
|
|
"${workspaceRoot}/packages/pyright/dist/**/*.js"
|
|
]
|
|
},
|
|
{
|
|
"name": "Pyright CLI (pyright-internal)",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"program": "${workspaceRoot}/packages/pyright-internal/debug.js",
|
|
"args": [
|
|
"--typeshedpath",
|
|
"${workspaceRoot}/packages/pyright-internal/typeshed-fallback",
|
|
"--version",
|
|
],
|
|
"internalConsoleOptions": "openOnSessionStart",
|
|
"outFiles": [
|
|
"${workspaceRoot}/packages/pyright-internal/out/**/*.js"
|
|
]
|
|
},
|
|
{
|
|
"name": "Pyright tests",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"args": [
|
|
"--runInBand"
|
|
],
|
|
"cwd": "${workspaceRoot}/packages/pyright-internal",
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"program": "${workspaceFolder}/packages/pyright-internal/node_modules/jest/bin/jest"
|
|
},
|
|
{
|
|
"name": "Pyright extension",
|
|
"type": "extensionHost",
|
|
"request": "launch",
|
|
"runtimeExecutable": "${workspaceRoot}/packages/vscode-pyright/dist/extension.js",
|
|
"preLaunchTask": "npm: build:extension:dev",
|
|
"args": [
|
|
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-pyright",
|
|
// The published extension is named "ms-pyright.pyright", but in debug mode it's "ms-pyright.vscode-pyright"
|
|
// to allow the extension code to participate in the lerna monorepo. Make sure that the published extension
|
|
// isn't enabled, otherwise both are loaded and conflict.
|
|
"--disable-extension=ms-pyright.pyright"
|
|
],
|
|
"smartStep": true,
|
|
"sourceMaps": true,
|
|
"outFiles": [
|
|
"${workspaceRoot}/packages/vscode-pyright/dist/**/*.js"
|
|
]
|
|
},
|
|
{
|
|
"name": "Pyright extension (watch)",
|
|
"type": "extensionHost",
|
|
"request": "launch",
|
|
"runtimeExecutable": "${workspaceRoot}/packages/vscode-pyright/dist/extension.js",
|
|
"preLaunchTask": "Watch extension",
|
|
"args": [
|
|
"--extensionDevelopmentPath=${workspaceFolder}/packages/vscode-pyright",
|
|
// The published extension is named "ms-pyright.pyright", but in debug mode it's "ms-pyright.vscode-pyright"
|
|
// to allow the extension code to participate in the lerna monorepo. Make sure that the published extension
|
|
// isn't enabled, otherwise both are loaded and conflict.
|
|
"--disable-extension=ms-pyright.pyright"
|
|
],
|
|
"smartStep": true,
|
|
"sourceMaps": true,
|
|
"outFiles": [
|
|
"${workspaceRoot}/packages/vscode-pyright/dist/**/*.js"
|
|
]
|
|
},
|
|
{
|
|
"name": "Pyright attach server",
|
|
"type": "node",
|
|
"request": "attach",
|
|
"port": 6600,
|
|
"smartStep": true,
|
|
"sourceMaps": true,
|
|
"outFiles": [
|
|
"${workspaceRoot}/packages/vscode-pyright/dist/**/*.js"
|
|
]
|
|
},
|
|
{
|
|
"name": "Pyright jest current file",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"args": [
|
|
"${fileBasenameNoExtension}",
|
|
"--runInBand",
|
|
"--detectOpenHandles",
|
|
"--forceExit",
|
|
"--testTimeout=180000"
|
|
],
|
|
"cwd": "${workspaceRoot}/packages/pyright-internal",
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"program": "${workspaceFolder}/packages/pyright-internal/node_modules/jest/bin/jest"
|
|
},
|
|
{
|
|
"name": "Pyright jest selected test",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"args": ["${fileBasenameNoExtension}", "--runInBand", "-t", "${selectedText}", "--forceExit", "--testTimeout=180000"],
|
|
"cwd": "${workspaceRoot}/packages/pyright-internal",
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"program": "${workspaceFolder}/packages/pyright-internal/node_modules/jest/bin/jest"
|
|
},
|
|
{
|
|
"name": "Pyright fourslash current file",
|
|
"type": "node",
|
|
"request": "launch",
|
|
"args": [
|
|
"fourSlashRunner.test.ts",
|
|
"-t ${fileBasenameNoExtension}",
|
|
"--runInBand",
|
|
],
|
|
"cwd": "${workspaceRoot}/packages/pyright-internal",
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"program": "${workspaceFolder}/packages/pyright-internal/node_modules/jest/bin/jest"
|
|
}
|
|
]
|
|
} |