如何在Sublime Text中更改xdebug键绑定?

时间:2014-01-15 16:18:02

标签: xdebug sublimetext3

我想在Sublime Text 3中更改XDebug插件的键绑定。如何更改运行跳过的键绑定退出等?

3 个答案:

答案 0 :(得分:19)

此答案更完整answer from user2968356

要完成此答案,.sublime-package文件是一个存档,因此可以使用ZIP实用程序对其进行解压缩。没有必要编辑包中的Default.sublime-keymap,我们可以复制键绑定并将其修改为首选项中提供的Default.sublime-keymap - > Sublime Text中的键绑定 - 用户

并提供一个快捷方式,这里是XDebug包的默认键绑定,随意修改:

{"keys": ["ctrl+f8"], "command": "xdebug_breakpoint"},
{"keys": ["shift+f8"], "command": "xdebug_conditional_breakpoint"},
{"keys": ["ctrl+shift+f5"], "command": "xdebug_continue", "args": {"command": "run"}},
{"keys": ["ctrl+shift+f6"], "command": "xdebug_continue", "args": {"command": "step_over"}},
{"keys": ["ctrl+shift+f7"], "command": "xdebug_continue", "args": {"command": "step_into"}},
{"keys": ["ctrl+shift+f8"], "command": "xdebug_continue", "args": {"command": "step_out"}},
{"keys": ["ctrl+shift+f9"], "command": "xdebug_session_start"},
{"keys": ["ctrl+shift+f10"], "command": "xdebug_session_stop"},
{"keys": ["ctrl+shift+f11"], "command": "xdebug_layout", "args": {"keymap" : true}}

答案 1 :(得分:2)

转到sublime菜单中的Preferences -> Browse Packages...

这将打开Packages文件夹。返回一个文件夹,您应该看到另一个名为Installed Packages的文件夹。

找到xdebug的.sublime-package,通常根据您通过包控件安装的软件包名称命名。

在里面找到一个包含所有键绑定的Default.sublime-keymap文件。

更改您的需求,保存并重新启动sublime。


干杯,希望这有帮助!

答案 2 :(得分:0)

对于Max用户,您可能希望替换“ctrl'使用' super',这是命令键。以下是我的设置:

[
    {"keys": ["super+f16"], "command": "xdebug_breakpoint"},
    {"keys": ["shift+f16"], "command": "xdebug_conditional_breakpoint"},
    {"keys": ["super+shift+f5"], "command": "xdebug_continue", "args": {"command": "run"}},
    {"keys": ["super+f13"], "command": "xdebug_continue", "args": {"command": "step_over"}},
    {"keys": ["super+f14"], "command": "xdebug_continue", "args": {"command": "step_into"}},
    {"keys": ["super+f15"], "command": "xdebug_continue", "args": {"command": "step_out"}},
    {"keys": ["super+shift+f9"], "command": "xdebug_session_start"},
    {"keys": ["super+shift+f17"], "command": "xdebug_session_stop"},
    {"keys": ["super+shift+f18"], "command": "xdebug_layout", "args": {"keymap" : true}}
]