You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ran "Pyright Language Client" and expected all node processes to be automatically attached. but it didn't.
that's fine, so I attached to the server node manually using "Pyright Language Server" launch config. that worked. but it didn't show worker_threads (nodejs).
that seems to be another bug? or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Thanks for the issue! Indeed, we didn't attach child processes in extension host debugging. In the linked commit, we now do. You'll have to make two changes to make this work on your codebase:
Add autoAttachChildProcesses: true to your launch config. I've defaulted this to false for extension hosts since other extensions will often spin up processes the user doesn't care about, such as tsserver.js processes, eslint, etc. which would be noisy and potentially confusing.
Remove the explicit '--inspect=6600' in from the debugOptions in the client. This interferes with the auto attachment process in this extension.
patch file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 0da1112..894b5c5 100644
--- a/.vscode/launch.json+++ b/.vscode/launch.json@@ -38,6 +38,7 @@
"name": "Pyright Language Client",
"type": "extensionHost",
"request": "launch",
+ "autoAttachChildProcesses": true,
"runtimeExecutable": "${workspaceRoot}/client/out/src/extension.js",
"preLaunchTask": "npm: build:clientServerDebug",
"args": [
@@ -100,4 +101,4 @@
}
}
]
-}
\ No newline at end of file
+}diff --git a/client/src/extension.ts b/client/src/extension.ts
index 6967a05..42173e5 100644
--- a/client/src/extension.ts+++ b/client/src/extension.ts@@ -25,7 +25,7 @@ export function activate(context: ExtensionContext) {
const bundlePath = context.asAbsolutePath(path.join('server', 'server.bundle.js'));
const nonBundlePath = context.asAbsolutePath(path.join('server', 'src', 'server.js'));
- const debugOptions = { execArgv: ['--nolazy', '--inspect=6600'] };+ const debugOptions = { execArgv: ['--nolazy'] };
// If the extension is launched in debug mode, then the debug server options are used.
const serverOptions: ServerOptions = {
Node.js doesn't currently expose worker threads over the inspector protocol, see: nodejs/node#26609
I tried the latest js-debug (https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug-nightly&ssr=false#overview) with this repo (https://github.com/microsoft/pyright)
ran "Pyright Language Client" and expected all node processes to be automatically attached. but it didn't.
that's fine, so I attached to the server node manually using "Pyright Language Server" launch config. that worked. but it didn't show worker_threads (nodejs).
that seems to be another bug? or am I doing something wrong?
The text was updated successfully, but these errors were encountered: