Skip to content

Conversation

@dirondin
Copy link
Contributor

Add new launch config debug option for silent '{0}' is already running. Do you want to start another instance? confirm dialog.

Tested with simple launch config:

{
    "command": "npm start",
    "name": "Run npm start",
    "request": "launch",
    "type": "node-terminal",
    "multipleSessionWarning": false
}

This PR fixes #147912

@dirondin dirondin force-pushed the dirondin/147912_multipleSessionWarning_option branch from d574251 to cbce288 Compare April 22, 2022 10:57
@weinand weinand assigned roblourens and unassigned weinand Apr 25, 2022
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Apr 25, 2022
@roblourens roblourens added this to the May 2022 milestone Apr 25, 2022
@roblourens roblourens modified the milestones: May 2022, June 2022 Jun 1, 2022
@dirondin
Copy link
Contributor Author

dirondin commented Jun 27, 2022

Can anyone review this PR or provide feedback? :)

@roblourens
Copy link
Member

Sorry for letting this slip through the cracks. I guess having this as a launch config option, rather than a user/workspace setting makes sense since there might be a particular launch config that you want to start multiple times?

I will take a look at this next week for July.

@roblourens roblourens modified the milestones: June 2022, July 2022 Jun 28, 2022
@dirondin
Copy link
Contributor Author

It might make sense to make this option through the user/workspace setting 🤔
Also will be grate enabled this option (always launch or always don't launch) directly from confirm dialog (like "[ ] Remember my choice").
Maybe I will make this option next weekend 👍

@roblourens
Copy link
Member

Not sure about the checkbox, where we have options like that it usually stores it in some hidden state and does not write to a launch config

@roblourens roblourens closed this Jun 29, 2022
@roblourens roblourens reopened this Jun 29, 2022
@dirondin
Copy link
Contributor Author

Yes. The checkbox is an option for user/workspace or "hidden" location settings, not a launch configuration property. I just said that I would try to explore this option as well (in another PR).

@roblourens
Copy link
Member

Feel free to explore it, but I'm not sure how I feel about that option, would take some thinking

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts @isidorn?

weinand
weinand previously approved these changes Jul 20, 2022
@roblourens
Copy link
Member

This looks good, but I'm out of the office and will merge it for August.

@isidorn
Copy link
Collaborator

isidorn commented Jul 27, 2022

@roblourens I am not a biggest fan of adding these "UI" settings to the launch.json. A better approach would probably be a setting. And yes I know that then it is not launch config specific, but I am worried if we keep it in a launch.json nobody will find it.

So a dialog + checkbox that writes to a setting is the way to go imho.
Rule of thumb - avoid UI attributes in launch configurations.

@roblourens
Copy link
Member

To me, it's similar to the presentation section, which also sets metadata on how vscode should present/handle the launch config. I think that per-launch config makes the most sense, because starting multiple sessions of the same config is actually annoying, and I only want to avoid it for some specific configs.

@roblourens roblourens enabled auto-merge (squash) August 4, 2022 23:14
@roblourens roblourens merged commit 81bc5f3 into microsoft:main Aug 4, 2022
joyceerhl pushed a commit that referenced this pull request Aug 10, 2022
* Fix #147912 (multipleSessionWarning debug option)

* Fix #147912 (suppressMultipleSessionWarning debug option)

* Fix description and condition

Co-authored-by: Rob Lourens <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2022
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to disable multiple debug sessions message

5 participants