Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug sessions can't be monitored across extension hosts #233184

Closed
thegecko opened this issue Nov 6, 2024 · 4 comments
Closed

Debug sessions can't be monitored across extension hosts #233184

thegecko opened this issue Nov 6, 2024 · 4 comments
Assignees

Comments

@thegecko
Copy link
Contributor

thegecko commented Nov 6, 2024

Does this issue occur when all extensions are disabled?: No, but this removes all debuggers :)

  • VS Code Version: 1.95.1
  • OS Version: Windows

It seems that some debug session functionality can be implemented across extension hosts and some cannot.
e.g. vscode.debug.onDidChangeActiveDebugSession is successfully fired between hosts, however vscode.debug.registerDebugAdapterTrackerFactory does not work.

Steps to Reproduce:

  1. Use a setup with a remote workspace (e.g. WSL on Windows)
  2. Deploy a debugger extension into the workspace host
  3. Deploy an extension in the ui/local host which listens to debug events

Observe that debugAdapterTrackerFactory does not work and I would expect to be able to listen to debug events.

This scenario has come about because we have a browser-based debugger which must run in the UI extension host and we have also developed a generic debug memory viewer to interact with different debuggers no matter where they are running (see eclipse-cdt-cloud/vscode-memory-inspector#150).

If this isolation of debug events is by design, are there any patterns which could be employed to specify the memory extension is installed in the same host as the debugger bearing in mind the debugger could be in any host? I don't believe extensionKind is enough because this decision needs to be made at runtime.

Copy link

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

Happy Coding!

@roblourens
Copy link
Member

Yeah, debug adapter trackers currently have to be in the same EH as the DA. #196009 essentially covers this.

generic debug memory viewer to interact with different debuggers no matter where they are running

So it could work with debuggers in either EH? I don't think there's really a good solution for you right now.

Just with the way debug adapters and debugging works, it wouldn't be straightforward to fix this, needs big changes to how debug adapters work in the EH.

Maybe a workaround would be to actually publish it as two extensions, one "ui" and one "workspace"? A bit weird but something like that might be a way out.

Closing as dupe of #196009

@thegecko
Copy link
Contributor Author

thegecko commented Nov 7, 2024

Ok, thanks.

Contrary to #196009, however, debug trackers do work in the UI EH (we use them) you just need your debugger there too!

@roblourens
Copy link
Member

Yeah, that's not called out in the OP but Connor's comment calls it out and I think that's behind the original issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants