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

Support to start multiple debug sessions from a single launch config #110226

Closed
weinand opened this issue Nov 9, 2020 · 6 comments
Closed

Support to start multiple debug sessions from a single launch config #110226

weinand opened this issue Nov 9, 2020 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Nov 9, 2020

Today VS Code prohibits (silently) launching multiple debug sessions from a single launch config.

I suggest that we improve this obscure behavior in the following way:
when trying to launch a launch config a second time an alert is shown explaining that a debug session is already running and provides an option to launch another session under a different name, e.g. "program" -> "program (2)" or to cancel the attempt.

@weinand weinand added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Nov 9, 2020
@weinand weinand added this to the On Deck milestone Nov 9, 2020
@isidorn
Copy link
Contributor

isidorn commented Nov 9, 2020

I agree this could be improved. Do you think we should simply add these "Launch anyway" button in the notification? Or would you expect a modal dialog? Or something else?

@weinand
Copy link
Contributor Author

weinand commented Nov 9, 2020

@isidorn good question. Initially I thought a modal dialog would be ok because the situation is rare and users should have the problem "right in their face".
But maybe a notification would be less intrusive.
On the other hand: the run button next to the debug down is very far away from the notification (opposite corner). Do users realise that the notification explains why pressing the run button has no effect?
So I do not really know...

"Launch anyway" is a good action text for both cases.

@isidorn
Copy link
Contributor

isidorn commented Jan 7, 2021

I started thinking about this and some thoughts:

  • Initialy we had this error to prevent users from creating multiple sessions on accident by double click
  • once debugging is started F5 is taken over by the Continue action
  • we now disable the Start action while a session is initialising

Due to the above, I think it is quite hard for the user to accidently get into this state. He has to click two times on the action in the Debug Viewlet, but in correct time intervals (since while initialising he would not be able to do that).

And due to that, I suggest that we simply start a new session automatically and give it a different name - suffix with 2.
So no prompts to start. Only if we hear feedback from users that they end up in this state by accident we can add a prompt.

Let me know what you think.
fyi @connor4312

@connor4312
Copy link
Member

Sounds good to me. I know at some point I'll accidentally start a duplicate session if I have multiple launch configs and forget to switch, but the impact of this is minor and easily fixed by stopping the new sesion.

@weinand
Copy link
Contributor Author

weinand commented Jan 7, 2021

@isidorn yep, let's try this.

The only issue I see is that the names of the additional debug sessions no longer match the name of the underlying debug config. Let's hope that nobody is relying on this...

@isidorn
Copy link
Contributor

isidorn commented Jan 7, 2021

I have pushed a first version of this. Try it out and let me know how it works for you.
I just played with it and seems to work just fine.
I also made sure that nowhere in our code base we depend on session names - we use ids everywhere. As for extensions hopefully nobody is relying on this as well.

Note that the naming will look like this when using js-debug due to child sessions, which I think is fine

Screenshot 2021-01-07 at 19 59 04

@isidorn isidorn added the verification-needed Verification of issue is requested label Jan 7, 2021
@isidorn isidorn closed this as completed Jan 7, 2021
@aeschli aeschli added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Jan 26, 2021
@isidorn isidorn added the on-release-notes Issue/pull request mentioned in release notes label Jan 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants