用于启动配置的 vscode 键盘快捷键 [英] vscode keyboard shortcut for launch configuration

查看:40
本文介绍了用于启动配置的 vscode 键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 vscode 中,我有一个包含多个配置的 launch.json.

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 find any information, thanks!

推荐答案

差不多,但不完全.

据我所知,没有 vs-code 命令可以开始调试给定的启动配置.

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

您可以做的是将键盘快捷键指向 workbench.action.debug.selectandstart 命令,该命令将弹出一个对话框供您选择配置并按 Enter.在实践中,这可以很快完成,因为您只需要开始输入启动配置的第一个或两个字母或使用箭头

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

要启用此点击 Ctrl+kCtrl+s(至少这是windows,如果这对您不起作用,您可以随时在命令面板中搜索键绑定").

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).

搜索 workbench.action.debug.selectandstart 命令,然后右键单击或单击编辑图标以更改键绑定:

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

这篇关于用于启动配置的 vscode 键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆