vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Extension host debug just shows loading indicator

Open SimonSiefke opened this issue 3 years ago • 2 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.73.1
  • OS Version: Ubuntu 22.10

Steps to Reproduce:

  1. Open a folder with VSCode
  2. Open VSCode's Process Explorer
  3. Right click on extensionHost, then click debug
  4. Debug Panel opens and shows a loading indicator
  5. After some time, the loading indicator stops

debug-loading

SimonSiefke avatar Dec 07 '22 21:12 SimonSiefke

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

vscodenpa avatar Dec 07 '22 21:12 vscodenpa

I don't see this 'debug' option, and it seems a little suspicious to me, do you know about this @Tyriar?

roblourens avatar Dec 08 '22 17:12 roblourens

@roblourens doesn't work for extension host for me, but it does for other node processes:

image

Tyriar avatar Dec 08 '22 18:12 Tyriar

Useful code pointer: https://github.com/microsoft/vscode/blob/6e2ee35d1630b4bb916f35fdbd678848d129547c/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts#L27-L28

Maybe to @connor4312?

Tyriar avatar Dec 08 '22 18:12 Tyriar

I didn't know this was a thing, but can give it a poke...

connor4312 avatar Dec 08 '22 18:12 connor4312

Searching through the sources, I'm not sure what the extensionHost process is. I don't see a string with such casing in our source, and I don't reproduce this when running on Linux. Similar to Rob's screenshot I only see an extension-host which has no Debug option.

@Tyriar it sounds like you were able to hit this... what environment were you running in, and could you get the command line of whatever process ID is extensionHost for you?

connor4312 avatar Dec 12 '22 23:12 connor4312

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!

vscodenpa avatar Dec 20 '22 11:12 vscodenpa

@connor4312 I didn't try repro, just showed the debug button.

Tyriar avatar Dec 27 '22 15:12 Tyriar

@SimonSiefke given you can still reproduce this, please run ps -p <pid> -o args, where pid is the PID in the right hand column of the extensionHost process. That should give us some hints on what it is/how it's getting spawned.

connor4312 avatar Dec 27 '22 18:12 connor4312

Sure, this is the output of ps -p 20761 -o args:

COMMAND
/snap/code/116/usr/share/code/code --ms-enable-electron-run-as-node --inspect-port=0 /snap/code/116/usr/share/code/resources/app/out/bootstrap-fork --type=extensionHost --skipWorkspaceStorageLock

SimonSiefke avatar Dec 27 '22 21:12 SimonSiefke

ah, I was able to reproduce by using Remote SSH to connect to a Linux machine. But then debugging worked (well, I could connect, but as soon as the debugger pauses the ext host just deadlocks since the extension that handles debugging is the extension that's running in the process which is paused.)

@SimonSiefke did you install VS Code from snap, perchance?

connor4312 avatar Dec 27 '22 23:12 connor4312

Yes, I used sudo snap install code --classic to install VS Code.

SimonSiefke avatar Dec 28 '22 08:12 SimonSiefke

Verification: there should no longer be a Debug option in the context menu if --inspect(-port|-brk)=0 is present in the command line (since we don't know what port to connect to)

connor4312 avatar Dec 28 '22 23:12 connor4312

This bug has been fixed in the latest release of VS Code Insiders!

@SimonSiefke, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 717d7d62c8b4566ab6704de931e7fe8e0649d810 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

vscodenpa avatar Jan 03 '23 10:01 vscodenpa