local dap = require('dap')
dap.adapters.codelldb = {
type = 'server',
host = '127.0.0.1',
port = "${port}",
executable = {
-- CHANGE THIS to your path!
command = '/Users/wangchenchen/.local/share/nvim/mason/bin/codelldb',
args = {"--port", "${port}"},
-- On windows you may have to uncomment this:
-- detached = false,
}
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
Debug adapter version
V1.9.2
Steps to Reproduce
My example test case is very simple:
#include <stdio.h>
int main(int argc, char *argv[])
{
for (size_t i = 0; i < 10; i++) {
printf("i=%ld\n",i);
}
printf ("wcc shi shen");
return 0;
}
My breakpoint is like the following screenshot:
When i enter continue the code, the dap-ui automatically occur but with seconds, it will automatically disappear. I also try to debug python, it won't have such problem. Only with this problem when i debug c/cpp.
Expected Result
Suspected it won't automatically close and can successfully debug.
Debug adapter definition and debug configuration
Debug adapter version
V1.9.2
Steps to Reproduce
My example test case is very simple:
My breakpoint is like the following screenshot:
When i enter continue the code, the
dap-ui
automatically occur but with seconds, it will automatically disappear. I also try to debug python, it won't have such problem. Only with this problem when i debugc/cpp
.Expected Result
Suspected it won't automatically close and can successfully debug.
Actual Result
The
dap.log
file attach here: