Skip to content

Commit

Permalink
Add DapClearBreakpoints user command and user command docs
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Fussenegger <[email protected]>
  • Loading branch information
Geerayef and mfussenegger committed Dec 20, 2024
1 parent 7e48a80 commit 04ce47f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions doc/dap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,40 @@ Some example mappings you could configure:
end)
<

==============================================================================
USER COMMANDS *dap-user-commands*

nvim-dap provides the following user commands.

Session management:

- `DapContinue`: Continue executing a paused session or start a new one
- `DapDisconnect`: Disconnect from an active debugging session
- `DapNew`: Start one or more new debug sessions
- `DapTerminate`: Terminate the current session

Stepping:

- `DapRestartFrame`: Restart the active sessions' current frame
- `DapStepInto`: Step into the current expression
- `DapStepOut`: Step out of the current scope
- `DapStepOver`: Step over the current line

REPL:

- `DapEval`: Create a new window & buffer to evaluate expressions
- `DapToggleRepl`: Open or close the REPL

Breakpoints:

- `DapClearBreakpoints` : Clear all breakpoints
- `DapToggleBreakpoint` : Set or remove a breakpoint at the current line

Diagnostics:

- `DapSetLogLevel` : Set the log level
- `DapShowLog` : Show the session log in a split window

==============================================================================
CLIENT CONFIGURATION *dap.defaults*

Expand Down
1 change: 1 addition & 0 deletions plugin/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cmd('DapSetLogLevel',
cmd('DapShowLog', 'split | e ' .. vim.fn.stdpath('cache') .. '/dap.log | normal! G', {})
cmd('DapContinue', function() require('dap').continue() end, { nargs = 0 })
cmd('DapToggleBreakpoint', function() require('dap').toggle_breakpoint() end, { nargs = 0 })
cmd('DapClearBreakpoints', function() require('dap').clear_breakpoints() end, { nargs = 0 })
cmd('DapToggleRepl', function() require('dap.repl').toggle() end, { nargs = 0 })
cmd('DapStepOver', function() require('dap').step_over() end, { nargs = 0 })
cmd('DapStepInto', function() require('dap').step_into() end, { nargs = 0 })
Expand Down

0 comments on commit 04ce47f

Please sign in to comment.