Bot releases are hidden (Show)
:help dap-adapter
forlocal dap = require("dap")
dap.adapters.cmake = {
type = "pipe",
pipe = "${pipe}",
executable = {
command = "cmake",
args = {"--debugger", "--debugger-pipe", "${pipe}"}
}
}
dap.configurations.cmake = {
{
name = "Build",
type = "cmake",
request = "launch",
}
}
sigterm
request=attach
. This avoids terminating processes that were started outsideswitchbuf
is set to useopen
usetab
, and the same buffer is open in multiple windows, the focusedrepl.execute
function, to execute text as if entered in the REPL.vim.keymap.set("n", "<leader>di", function()
dap.repl.open()
dap.repl.execute(vim.fn.expand("<cexpr>"))
end)
-exec b some|
completed to -exec b -exec b some_function()
instead of -exec b some_function()
listener
option to the preview
widgethover
widget will now always evaluate an expression, instead of lookingwinopts
of widgets now accept a title
option..toggle()
on a widget multiple times should no longer append newFull Changelog: https://github.com/mfussenegger/nvim-dap/compare/0.6.0...0.7.0
Published by mfussenegger over 1 year ago
🐰🥚
Some improvements around startDebugging
that should enable debug-adapters with a type=server+executable
adapter definition to just work, without requiring extra logic in a adapter factory function. This enables vscode-js-debug support. See Debug Adapter Installation. (https://github.com/mfussenegger/nvim-dap/pull/877, https://github.com/mfussenegger/nvim-dap/pull/913)
Fixed some regressions introduced by the multi-session support. (https://github.com/mfussenegger/nvim-dap/pull/879, https://github.com/mfussenegger/nvim-dap/pull/882, https://github.com/mfussenegger/nvim-dap/pull/906)
Fixed a race condition that could cause run_to_cursor
to fail if the session changed during its operation.
Fixed lines in scope widget going under a wrong group (https://github.com/mfussenegger/nvim-dap/pull/889)
Changed the stop handling to jump to the top frame if the same thread is already marked as stopped. This can be the case if the execution was resumed using a debug adapter specific REPL command instead of one of the nvim-dap
step/continue commands. (https://github.com/mfussenegger/nvim-dap/pull/901)
Added a filter option to pick_process
Full Changelog: https://github.com/mfussenegger/nvim-dap/compare/0.5.0...0.6.0
Published by mfussenegger over 1 year ago
Added support for running multiple debugging session in parallel. This is
useful if you want to debug both a server application and a client. In this
initial version breakpoints are broadcast to all sessions, and whenever a
session emits a stopped
event, this session will get focused. This should
allow immediate inspection of variables and stepping from client to server
and vice versa. There is also a new sessions
widget that shows active
sessions.
To start a second debug session you have to call continue({ new = true })
or run(config)
with a configuration that has a different name than the
current active session, or with run(config, { new = true })
.
For plugins or customizations that use listeners, keep in mind that if you
receive a terminated
or disconnect
command, there can now still be other
sessions running.
For an example of an advanced use-case using this capability, see Debugging
Neovim with Neovim and nvim-dap
Added startDebugging
support. This will enable support for debugging python
applications using multiprocessing with debugpy
, once support for it is
released in debugpy
itself. The current debugpy
version 1.6.6 does not
support it but you can already try it using a version installed via git from
their main branch. This includes use-cases like debugging Django, Flask or
Celery with reload enabled.
This should also enable support for vscode-js-debug once
startDebugging
is implemented in it as well.
Some resiliency improvements around terminating sessions. In some cases
callbacks and listeners weren't triggered, and some late messages weren't
processed.
Added support for the restart
property in a terminated event. This allows
debug adapters to restart a debug session.
up()
and down()
now no longer flip around at the top or bottom.
Changed the REPL buffer to have buflisted=false
.
Added the supportsProgressReporting
capability. By default progress report
events sent from the debug adapter are shown via the status()
function. The
main intention is to give users and plugins the capability to subscribe to
those events via the listeners and customize the progress reporting display.
${input}
variablespickString
${input}
variables.server
adapter type with an executable
.output
events. The REPL should now no longer break up lines at arbitrary places.Full Changelog: https://github.com/mfussenegger/nvim-dap/compare/0.4.0...0.5.0
Published by mfussenegger almost 2 years ago
vim.diagnostic
Continue
and step functions can now be called with a count to executeswitchbuf
setting derived from the'switchbuf'
setting that can be used to change the behaviorG
) itfocus_frame
function which allows to focus the current frame whilerestart_frame
function which allows to reset the execution of the.clear
command to the REPL.${command:pickProcess}
variable${env:<NAME>}
variables.__call
metatables on configurations. This allows tovim.fn.input
to compute one.vscode/launch.json
file now.vscode/launch.json
file now auto applies the configurations.osx
, windows
or linux
properties. {
"type": "cppdbg",
"request": "launch",
"name": "Launch CPP",
"MIMode": "gdb",
"linux": {
"miDebuggerPath": "/usr/bin/gdb"
},
"windows": {
"miDebuggerPath": "C:\\MinGw\\bin\\gdb.exe"
}
}
Full Changelog: https://github.com/mfussenegger/nvim-dap/compare/0.3.0...0.4.0
Published by mfussenegger about 2 years ago
Increased the amount of connect retries when connecting to a debug-adapter of type server
and exposed a setting to change the number of retries. This should help with debug adapters like codelldb
where you spawn an executable that starts a service listening on TCP. It may take a while for that service to become available and the connect attempt could initially fail.
Added support for custom inputs
in vscode/launch.json
files. See :help dap-launch.json
for details.
Exposed a json_decode
function in dap.ext.vscode
to allow users to override it with alternative json parsers. This can be used to hook in a JSON5 parser for better compatibility with Microsoft JSON.
Added support for customizing the sign symbols before calling require('dap')
. Previously it was necessary to call sign_define
after having imported the dap
module.
Improved the handling of error messages sent by debug adapters.
The DapStopped
highlight is now cleared when using dap.close()
.
Added a DapLoadLaunchJSON
command that maps to require('dap.ext.vscode').load_launchjs()
Published by mfussenegger about 2 years ago
Improved the handling of disconnects. Previously if a user invoked terminate or disconnect multiple times, it would terminate or disconnect the session with the first invocation and the remaining invocations would eventually timeout. This timeout could cause a new session started later to disconnect as well, leading to an inconsistent state and unusable session.
Stepping operations (step_out
, step_into
, step_over
..) will now prompt for a thread to resume if there is no stopped thread in focus and if other threads are paused. This can be the case if either, threads were manually paused or if the auto_continue_if_many_stopped
option is set to false. See Demo
Functions used in configurations (:h dap-configuration
) can now also return coroutine
/thread
values. This allows to use asynchronous operations to compute values to use in the configuration. There are some constraints:
coroutine
.nvim-dap
by resuming the outer coroutine
with the result. If it fails to do so, the launch-session operation will become stuck.An example:
foo = function()
return coroutine.create(function(dap_run_co)
local items = {'one', 'two'}
vim.ui.select(items, { label = 'foo> '}, function(choice)
coroutine.resume(dap_run_co, choice)
end)
end)
end,
The pick_process
helper function which can be used in configurations to select a running process is now using vim.ui.select
instead of inputlist
.
Added a dap-type
variable to the integrated terminal buffer. This dap-type
variable contains the value of the :h dap-configuration
type
.
Added support for the breakpoint
event with reason = 'changed'
to allow debug adapters to change the verified state of breakpoints.
The hover
widget will now by default evaluate the selected expression if in visual mode. This makes it possible to define keymaps like vim.keymap.set('v', '<leader>dh', require('dap.ui.widgets').hover)
. The require("dap.utils").get_visual_selection_text
function which could be used before to get a similar behavior is now deprecated.
Added a new preview
widget that can be used to show the values of variables in the preview window. You can create a mapping like vim.keymap.set({'n', 'v'}, '<leader>dp', require('dap.ui.widgets').preview)
to use it.
The presentationHint.lazy
flag is now recognized in widgets rendering variables. This has the effect that lazy variables no longer take an extra line when loaded but instead the existing line is updated in-place.
dap>
prompt between the first line of the result and subsequent lines.Published by mfussenegger about 2 years ago
Initial release
After almost 400 commits and more than 2 years it's time