plugins.dap.adapters
Debug Adapter Protocol adapters.
Adapters can be defined as dynamic functions or categorized structured configs.
See Example for usage patterns.
Type: null or (open submodule of attribute set of raw lua code)
Default:
null
Example:
{
# Dynamic adapter using raw lua function
# Useful when adapter type is determined at runtime
python.__raw = ''
function(cb, config)
if config.request == 'attach' then
local port = (config.connect or config).port
local host = (config.connect or config).host or '127.0.0.1'
cb({
type = 'server',
port = assert(port, '`connect.port` is required for a godot `attach` configuration'),
host = host,
options = {
source_filetype = 'gdscript',
},
})
else
cb({
type = 'executable',
command = 'godot',
args = { '--path', config.project_path or vim.fn.getcwd(), '--remote-debug', '127.0.0.1:6006' },
options = {
source_filetype = 'gdscript',
},
})
end
end
'';
# Categorized structured config for executable adapter
executables.python = {
command = "python";
args = [ "-m" "debugpy" ];
};
# Categorized structured config for server adapter
servers.netcoredbg = {
port = 4711;
executable.command = "netcoredbg";
};
}
Declared by:
plugins.dap.adapters.executables
Debug adapters of executable type.
The adapters can also be set to a function which takes three arguments:
- A
on_configcallback. This must be called with the actual adapter table. - The |dap-configuration| which the user wants to use.
- An optional parent session. This is only available if the debug-adapter
wants to start a child-session via a
startDebuggingrequest.
This can be used to defer the resolving of the values to when a configuration is used. A use-case for this is starting an adapter asynchronous.
Type: null or (attribute set of ((raw lua code) or (submodule)))
Default:
null
Declared by:
plugins.dap.adapters.pipes
Debug adapters of pipe type.
The adapters can also be set to a function which takes three arguments:
- A
on_configcallback. This must be called with the actual adapter table. - The |dap-configuration| which the user wants to use.
- An optional parent session. This is only available if the debug-adapter
wants to start a child-session via a
startDebuggingrequest.
This can be used to defer the resolving of the values to when a configuration is used. A use-case for this is starting an adapter asynchronous.
Type: null or (attribute set of ((raw lua code) or (submodule)))
Default:
null
Declared by:
plugins.dap.adapters.servers
Debug adapters of server type.
The adapters can also be set to a function which takes three arguments:
- A
on_configcallback. This must be called with the actual adapter table. - The |dap-configuration| which the user wants to use.
- An optional parent session. This is only available if the debug-adapter
wants to start a child-session via a
startDebuggingrequest.
This can be used to defer the resolving of the values to when a configuration is used. A use-case for this is starting an adapter asynchronous.
Type: null or (attribute set of ((raw lua code) or (submodule)))
Default:
null
Declared by: