microsoft / vscode

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

Can't debug a plugin, can't exit debug mode, endless taskbar on "remoteExtensionHostProcess.js" #102169

Closed JonathanDotCel closed 4 years ago

JonathanDotCel commented 4 years ago

Steps to Reproduce:

  1. Sample plugin from yo code (javascript)
  2. set a breakpoint
  3. run the plugin
  4. step over some undefined nonsense like "var end = text.selection.end.character;" ('text' is not a defined var)
  5. "remoteExtensionHostProcess.js" is stuck on screen with the endless progress bar
  6. "Stop" won't work, shift + f5 won't work, stuck in debug mode
  7. tried closing the target.

image

Does this issue occur when all extensions are disabled?: Yes/No Not applicable

connor4312 commented 4 years ago

Thanks for the issue!

I don't get that issue locally. I suspect that another extension is trying to do something on the open file, which might take a very long time with the big, minified extensionHostProcess.js. This could show a progress bar and would lead to the problem you're describing: something blocking the main thread of the extension host would prevent the debugger from receiving any messages from VS Code, including the "disconnect" request.

To check if this is the case, you can do the following:

  1. Run the Show Running Extensions command. Hit the record ⚪ button in the top right corner to start a performance profile.
  2. Reproduce your issue. Give it a few seconds after opening remoteExtensionHostProcess.js
  3. Back on the running extensions page, click the stop ⏹️ button, and then the save 💾 button to save the cpuprofile. Share that here.

/needsMoreInfo

JonathanDotCel commented 4 years ago

Thanks for the issue!

I don't get that issue locally. I suspect that another extension is trying to do something on the open file, which might take a very long time with the big, minified extensionHostProcess.js. This could show a progress bar and would lead to the problem you're describing: something blocking the main thread of the extension host would prevent the debugger from receiving any messages from VS Code, including the "disconnect" request.

To check if this is the case, you can do the following:

  1. Run the Show Running Extensions command. Hit the record ⚪ button in the top right corner to start a performance profile.
  2. Reproduce your issue. Give it a few seconds after opening remoteExtensionHostProcess.js
  3. Back on the running extensions page, click the stop ⏹️ button, and then the save 💾 button to save the cpuprofile. Share that here.

/needsMoreInfo

Hi Connor,

tried my best, but as I'm not able to stop debugging, I can't get the output from Running Extensions. Back in the debugger/host, on the "Running Extensions" panel (e.g. if I bring it up again manually), then the only option is "start debugging extension host".

I was able to get this one by hitting "Start Debugging Extension Host" on the plugin source instance, and restarting debugging. So hopefully this profile is still useful. P.s I'm launching via WSL /mnt/c/ins/vscode/ and typing 'Code' incase the custom path, etc could be an issue.

Thanks. J CPU-20200710T223807.667Z.cpuprofile.txt

connor4312 commented 4 years ago

Hmm, not sure I totally understand the problem. Here's a recording of the steps I'm looking for: https://memes.peet.io/img/20-07-e7086225-bacf-4b18-bad3-65b8361b4613.webm Are you saying that that record button isn't present for you?

JonathanDotCel commented 4 years ago

Hmm, not sure I totally understand the problem. Here's a recording of the steps I'm looking for: https://memes.peet.io/img/20-07-e7086225-bacf-4b18-bad3-65b8361b4613.webm Are you saying that that record button isn't present for you?

image

If this does truly mean no extensions are loaded, (And I have no idea why this might have happened, it was working 10 minutes ago) , then the following dump is exactly as you asked for. Same symptoms, same setup, no extensions(apparently).

Cheers for the video, J

CPU-20200711T011310.417Z.cpuprofile.txt

connor4312 commented 4 years ago

That's odd. @sandy081 any ideas on this?

JonathanDotCel commented 4 years ago

Give me a ping if the project source or a recording, etc could be of any use. Cheers.

sandy081 commented 4 years ago

Can you please share the logs from the following locations

Please check if you are seeing the same issue as https://github.com/microsoft/vscode/issues/102082 ?

github-actions[bot] commented 4 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

JonathanDotCel commented 4 years ago

Can you please share the logs from the following locations

  • Help -> Toggle Developer Tools -> Console
  • View -> Command Pallette... -> Toggle Shared Process -> Console
  • View -> Open View… -> Log (Shared)
  • View -> Open View… -> Log (Window)

Please check if you are seeing the same issue as #102082 ?

Hi, sorry for the delay; I've been struggling to reproduce this one. In any case I've included the relevant information incase this should become an issue again.

I can't help but wonder if I was running out of RAM or something trying to display this file?

image

In any case, here are the logs you requested, from a fresh clean start of VSCode, defaulting to open my plugin:

Developer console: attached Shared process: attached Log (shared): empty Log (window):

[2020-07-22 09:42:59.833] [renderer1] [error] timeout after 1000 ms: Error: timeout after 1000 ms at t.RawDebugSession.handleErrorResponse (file:///C:/ins/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:3173:226) at file:///C:/ins/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:3172:532 at async t.RawDebugSession.shutdown (file:///C:/ins/vscode/resources/app/out/vs/workbench/workbench.desktop.main.js:3170:536)

And 'debug console':

activating extension starting language server (node:15852) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (node:15852) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. Congratulations, your extension "unityrefactor" is now active!

Thanks, J

-1595407581076_sharedprocess.log -1595407555508_devconsole.log