Luiz Renato Miranda
Luiz Renato Miranda

Reputation: 3

Sublime Text 4 - Debugger keybinds

After installing the Debugger package (https://github.com/daveleroy/SublimeDebugger; https://packagecontrol.io/packages/Debugger) in Sublime Text 4, I couldn't find instructions in the documentation to change the package's key bindings. In other words, I would like to use the "Run", "Step Into" and "Step Out" commands on shortcut keys such as F5, F6 and F7, but I don't know how to implement it.

For example, after installing the Xdebug Client package to change the Run command key binding, I wrote the following line in my sublime-keymap:

{"keys": ["ctrl+shift+f5"], "command": "xdebug_continue", "args": {"command": "run"}}

Therefore, I would like to know if it is possible to change the key bindings to use the Debugger package commands through shortcut keys and, if so, what are the correct commands and arguments?

Upvotes: 0

Views: 47

Answers (1)

Frank
Frank

Reputation: 16

Here you go mate:

{
  "keys": ["ctrl+shift+f5"],
  "command": "debugger",
  "args": { "action": "continue" },
},
{
  "keys": ["ctrl+shift+f6"],
  "command": "debugger",
  "args": { "action": "step_in" },
},
{
  "keys": ["ctrl+shift+f7"],
  "command": "debugger",
  "args": { "action": "step_out" },
},

If you wanna add more commands you can log them by opening Sublime's console, then run sublime.log_commands(True) then use Sublime's Menu to trigger a command. In your case you could do Tools -> Debugger -> Stop, then check the console to see which arguments are needed.

Upvotes: 0

Related Questions