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

Add "Disconnect single session" command #158575

Open
jrieken opened this issue Aug 19, 2022 · 10 comments
Open

Add "Disconnect single session" command #158575

jrieken opened this issue Aug 19, 2022 · 10 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Aug 19, 2022

This needs some explanation and what I do isn't as wrong as the title suggests: I have ~/Code/vscode for our sources and I have ~/Code/_samples/dummy-extension in which I try out and test API. The extension is sym-linked into ~/.vscode-oss-dev/extensions. This allows me to make changes in the extension and VS Code itself and easily test things

  • from vscode run/debug VS Code (it debugs everything: main, renderer, ext-host
  • in dummy-extension set a breakpoint in some extension code (where else)
  • from dummy-extension attach to extension host (to apply those breakpoints)
  • run the code, hit the breakpoint, and step in/out/over
  • 😕 the windows randomly change focus, both are debugging the extension host (naturally)

I don't know how you would implement this but the window at which breakpoint was most recently hit should be the active one

Screen.Recording.2022-08-19.at.13.09.47.mov
@roblourens
Copy link
Member

Would you consider using a multiroot workspace? That workflow should work. Otherwise I guess I'd have to implement some locking mechanism through the shared process, which sounds like a great bug generator.

@roblourens
Copy link
Member

Or do you want to just not attach to the extension host process in the vscode window?

@roblourens roblourens added the info-needed Issue requires more information from poster label Aug 20, 2022
@jrieken
Copy link
Member Author

jrieken commented Aug 22, 2022

Would you consider using a multiroot workspace?

No

@roblourens
Copy link
Member

I'd recommend not attaching to the EH process in the vscode window (you will need to change launch.json for this or add your own config which you could do in a workspace) or you can disable debug.focusWindowOnBreak in the vscode window. I think that doing exactly what you want will be really complicated.

@jrieken
Copy link
Member Author

jrieken commented Aug 23, 2022

I'd recommend not attaching to the EH process in the vscode window

Can I disconnect from the EH while still using the "big" launch config? E.g launch normally and from time to time just disconnect the EH?

@roblourens
Copy link
Member

Normally you would be able to but the compound has "stopAll": true so that if you disconnect from one, you will be disconnected from all. This is just so you don't have to click disconnect 5 times or find the "right" session with a stop button that will actually kill the app.

@jrieken
Copy link
Member Author

jrieken commented Aug 23, 2022

Is there a change for an alternative disconnect action? Given launch configs are shared and sits inside the repo I cannot just put my personal changes on top. In addition, stopAll is what I want but not exclusively

@roblourens
Copy link
Member

I think a "Disconnect Single Session" command would make sense that overrides stopAll

@roblourens
Copy link
Member

and sits inside the repo I cannot just put my personal changes on top

I use the vscode repo in a workspace with a single folder, I often have some custom workspace settings or launch configs

@VSCodeTriageBot
Copy link
Collaborator

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!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2022
@jrieken jrieken reopened this Aug 31, 2022
@jrieken jrieken removed the info-needed Issue requires more information from poster label Aug 31, 2022
@roblourens roblourens changed the title Random changes between windows that debug the same process Add "Disconnect single session" command Sep 12, 2022
@roblourens roblourens added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Sep 12, 2022
@roblourens roblourens added this to the Backlog milestone Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants