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

ability to get/set currently selected debug configuration #77138

Open
zamanzamanli opened this issue Jul 10, 2019 · 10 comments
Open

ability to get/set currently selected debug configuration #77138

zamanzamanli opened this issue Jul 10, 2019 · 10 comments
Assignees
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@zamanzamanli
Copy link

Currently, we can run vscode.debug.startDebugging(workspaceFolder, configName) to run the debugger from the extension. Is there a way to change currently selected debug configuration from the extension? Something like vscode.debug.changeCurrentDebugger(workspaceFolder, configName) would be very helpful.

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues api info-needed Issue requires more information from poster feature-request Request for new features or functionality labels Jul 10, 2019
@weinand
Copy link
Contributor

weinand commented Jul 10, 2019

Currently we have no API for this.
What is the exact use case?

@zamanzamanli
Copy link
Author

@weinand , There are two use cases I want to accomplish.

  1. I have a button which will open the launch configuration using the command workbench.action.debug.configure. I want the cursor to be at the configuration I choose, but the cursor ends up at the configuration selected by a user in the debug window. If I could scroll to the configuration I want by using vscode.commands.executeCommand("workbench.action.debug.configure", "config.name") that would be helpful.

  2. We have a custom window for the extension and there we show the last used debug configuration. When a user changes the configuration from that window, I want it to be changed in the actual debug window as well.

@weinand weinand removed the info-needed Issue requires more information from poster label Oct 14, 2019
@weinand
Copy link
Contributor

weinand commented Oct 14, 2019

@zamanzamanli thanks for the info.

@weinand weinand changed the title Extension - ability to change currently selected debug configuration ability to get/set currently selected debug configuration Oct 14, 2019
@weinand
Copy link
Contributor

weinand commented Oct 14, 2019

I've changed the title to include API for reading the currently selected debug configuration.

@weinand weinand added the help wanted Issues identified as good community contribution opportunities label Oct 14, 2019
@GordonSmith
Copy link

GordonSmith commented Oct 15, 2019

@weinand I would like to see:

  • workspace.getDebugLaunchName
  • workspace.setDebugLaunchName
  • workspace.onDidDebugLaunchNameChange

Since we already can get and modify the actual configurations, this about being notified when the user selects a new one and being able to get / set the current one.

Use Case 1
We have the concept of a "Platform" which has many configurations and when submitting code to it, it can be submitted to: run, compile or debug. Currently we achieve this by having many launch "similar" configurations, but the permutations add up.
So when the user changes launch configuration, it would be good if we were notified so that we could query the server for the list of "queues" and then display that in the status bar (the user can then click to change queue, like they change file type currently).

Use Case 2
For our language it would make sense to remember the launch config used with a specific file and this would simplify the process

@weinand
Copy link
Contributor

weinand commented Oct 15, 2019

@GordonSmith thanks for the input!

@philliphoff
Copy link
Member

The vscode-docker extension has a need for this as well. When the user executes the "add Docker-related content to the workspace" command, it currently scaffolds task and debug launch configurations. We'd like to be able to switch the selected debug launch configuration to that new configuration, so that the user can immediately start debugging within a Docker container. (This would also add consistency with our equivalent scaffolding in VS.)

@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@MihaelIsaev
Copy link

We also would like to be able to preselect launch configuration in our platform extension for user convenience.

Since the issue is still Open then it seems this feature is still not implemented? Any progress on this? It's been two years...

@connor4312 connor4312 self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

8 participants