microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.64k stars 29.04k forks source link

Unable to start extension development host when using Insiders #224182

Open DanTup opened 2 months ago

DanTup commented 2 months ago

Using a clean clone of Dart-Code, I am unable to start debugging the extension when using Code-Insiders:

Version: 1.92.0-insider (user setup)
Commit: 4d17e85cfd911fb6b116e08a4d7c37cd725a966a
Date: 2024-07-26T13:12:28.318Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

If I use stable Code, everything is fine - however with Insiders, when I press F5 to start debugging the extension, the extension development host never appears.

In the file at C:\Users\danny\AppData\Roaming\Code - Insiders\logs\20240729T140347\window2\renderer.log I see

2024-07-29 14:04:02.171 [info] Started local extension host with pid 16096.
2024-07-29 14:04:02.417 [info] Loading development extension at c:\Dev\Temp Projects\newtest

Nothing more is logged.

In the file at C:\Users\danny\AppData\Roaming\Code - Insiders\logs\20240729T140347\window2\exthost\exthost.log I see:

2024-07-29 14:04:03.513 [info] Extension host with pid 16096 started
2024-07-29 14:04:03.513 [info] Skipping acquiring lock for c:\Users\danny\AppData\Roaming\Code - Insiders\User\workspaceStorage\27751e09278ce635e4be60fbdc34034a.
2024-07-29 14:04:03.522 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-07-29 14:04:03.533 [info] ExtensionService#_doActivateExtension Dart-Code.dart-code, startup: false, activationEvent: 'onLanguage:dart'
2024-07-29 14:04:03.707 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2024-07-29 14:04:03.749 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2024-07-29 14:04:03.801 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-07-29 14:04:03.852 [info] Eager extensions activated
2024-07-29 14:04:03.855 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-07-29 14:04:03.857 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-07-29 14:04:04.312 [info] Extension host terminating: renderer closed the MessagePort
2024-07-29 14:04:04.320 [error] Canceled: Canceled
    at new C (c:\Users\danny\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:35204)
    at E.U (c:\Users\danny\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:6017)
    at z.<computed>.j.charCodeAt.R.CharCode.DollarSign.z.<computed> (c:\Users\danny\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:3107)
    at d.g (c:\Users\danny\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:154:205942)
(followed by many more "Canceled" errors)

I can't find anything else useful in any of the logs, nor is there anything in the Debug Console of the main instance of the Chrome devtools.

I also cannot repro this project with a newly created yo code project, that seems to load fine (although I don't see any obvious differences).

If there are other logs I can provide or troubleshooting steps, please let me know.

DanTup commented 2 months ago

Seems like sometimes if I run "Developer; Reload Window" and then try again, it works. If I restart Code, then it doesn't work, then run the command, then it works. I can't see anything that should be different on a clean load vs reloading the window though.

roblourens commented 2 months ago

Sorry for the slow response. Tracking a couple issues that seem likely to be related, although I don't remember seeing it before this week: https://github.com/microsoft/vscode/issues/225647 and https://github.com/microsoft/vscode/issues/225485

Is this still happening for you in Insiders? Most of the time?

DanTup commented 2 months ago

I'm not seeing the same behaviour now, but I do see a notification pop up saying it's watching for the watch task, even though that appears to have finished:

image

If I click "Debug Anyway", it launches, but I can't tell what it's waiting for. The task uses ts-webpack-watch (see https://github.com/Dart-Code/Dart-Code/blob/master/.vscode/tasks.json).