10

I've created a launch.json file and can run and debug my app. However, to do that I have to click on "Run and Debug" on the left (or ctrl+shift+D). Then select the config from my launch.json and run it.

I'm looking for a way to have that drop down and run button always visible and usable without having to switch to the "Run and Debug" tab. Like in PyCharm:

Pycharm

I found https://www.reddit.com/r/vscode/comments/r42rps/tutorial_adding_run_and_debug_buttons_to_vscode/ that gets me sort of there but its very manual... All i want is for the current run debug dropdown that vscode already has to be usable at all times without sacrificing 1 3rd of my screen every time i want to run an app.

3
  • don't use the top-right triangle button, it does not use the launch config, select a launch config and then just press F5 or Shft+F5 Commented Jul 20, 2023 at 13:36
  • See stackoverflow.com/questions/48645098/…. While there is no way to show the built-in Run and Debug config dropdown without activating the Run and Debug view, you may find something helpful in the link, including making a keybinding to any launch config you want. Commented Jul 27, 2023 at 20:11
  • I wonder if we fork and and disable this line that calls hide, it will always be visible? github.com/microsoft/vscode/blob/… Commented Dec 28, 2024 at 21:12

2 Answers 2

2

I'm not aware of a way to do this without any extensions.

But you can get some other niceties in vanilla VS Code too.

  • There's the Debug: Select and Start Debugging command in the command palette, which, when invoked, prompts you to select a launch config from a keyboard-navigable menu to start debugging with. You can also bind it to a keyboard shortcut using it's command ID- workbench.action.debug.selectandstart.

  • There's the Debug: Start Debugging command, which starts the currently selected launch config, and which you can bind to a keyboard shortcut using workbench.action.debug.start.

  • There's also a debug.startFromConfig, where you can write a launch config in the args property (unfortunately, you'll have to have some "code duplication" (see also https://github.com/microsoft/vscode/issues/97921).

Some language-support extensions contribute to the editor/title/run menu contribution point, but typically making it do a "run current file" action rather than start a launch config (though some will try to use matching launch configs).

You may also be interested in How I can add tools/actions/buttons to the Command Center of VS Code.

Sign up to request clarification or add additional context in comments.

1 Comment

Happy to add an extension if needed but i haven't been able to find one
-1

If you accidentally hide the Configurations drop down (that shows configurations in your launch.json), right click on the "gear" on the top left of the Run and Debug bar and select "Reset menu"

1 Comment

this problem is not the subject of this question. the title says "without switching to the run and debug view"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.