vscode keyboard shortcut for launch configuration

后端 未结 2 1792
不思量自难忘°
不思量自难忘° 2021-01-04 01:35

In vscode, I have a launch.json with more than one configuration.

Is there a way to assign a keyboard shortcut to a specific configuration?, I\'ve not been able to f

2条回答
  •  醉话见心
    2021-01-04 02:26

    Almost, but not quite.

    To my knowledge there is no vs-code command to start debugging a given launch configuration.

    What you can do instead is point a keyboard shortcut at the workbench.action.debug.selectandstart command which will pop-up a dialogue for you to select the configuration and hit enter. In practice this can be done very quickly as you only need to start typing the first letter or two of your launch config or use the arrows

    To enable this hit Ctrl+kCtrl+s (at least this is the default shortcut on windows, you can always search for 'keybindings' in the command palette if this doesn't work for you).

    Search for the workbench.action.debug.selectandstart command then right-click or click the edit icon to change the keybinding:

提交回复
热议问题