-
-
Notifications
You must be signed in to change notification settings - Fork 253
Closed
Description
Debug adapter definition and debug configuration
The cppdbg config is as shown bellow
dap.adapters.cppdbg = {
id = "cppdbg",
type = "executable",
command = "C:/Users/liuya/.vscode/extensions/ms-vscode.cpptools-1.9.7/debugAdapters/bin/OpenDebugAD7",
}
dap.configurations.c = {}
dap.configurations.cpp = {}
-- load from json file
require("dap.ext.vscode").load_launchjs(nil, { cppdbg = { "c", "cpp" }, python = { "python" } })The "./vscode/launch.json" file is as shown bellow
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"setupCommands": [
{
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}Debug adapter version
vscode-cpptools 1.9.7
Steps to Reproduce
- write a a.c and build it by "gcc -g -o a.exe"
- debug a.exe with "nvim-dap", "vscode", "vimspector"
- both "vscode" and "vimspector" can work correctly, but "nvim-dap" failed

Expected Result
The debug can work correctly.
Actual Result
[ ERROR ] 2022-04-12T15:47:42Z+0800 ] ...m-data\site\pack\packer\opt\nvim-dap/lua/dap/session.lua:827 ] "stderr" { command = "C:/Users/liuya/.vscode/extensions/ms-vscode.cpptools-1.9.7/debugAdapters/bin/OpenDebugAD7",
id = "cppdbg",
type = "executable"
} "waiting for v8 protocol on stdin/stdout\r\n"
[ INFO ] 2022-04-12T15:47:42Z+0800 ] ...m-data\site\pack\packer\opt\nvim-dap/lua/dap/session.lua:795 ] "Closed all handles"
[ INFO ] 2022-04-12T15:47:42Z+0800 ] ...m-data\site\pack\packer\opt\nvim-dap/lua/dap/session.lua:798 ] "Process closed40852 false
[ INFO ] 2022-04-12T15:47:43Z+0800 ] ...m-data\site\pack\packer\opt\nvim-dap/lua/dap/session.lua:1058 ] "Session closed due to disconnect"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels