I am using debugging by attaching to a remote program with the following entries in launch.json:
{
"name": "Debug Remote",
"type": "cppdbg",
"request": "attach",
"program": "...",
"processId": "${command:pickRemoteProcess}",
"sourceFileMap": {
"...": "..."
},
"pipeTransport": {
"pipeCwd": "/usr/bin",
"pipeProgram": "/usr/bin/ssh",
"pipeArgs": [
"..."
],
"debuggerPath": "/usr/bin/gdb"
},
"osx": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
}
After starting debugging, gdb attaches to the program, but shortly after displaying the stack trace, the debugger crashes with error messages like:
"Unexpected token C in JSON at position 2110. Der Debugadapter wird beendet."
Sometimes the token is empty and sometimes it is something different than "C". Also the position is always different. The number of those messages per start ranges from 1 to 5.
I always had this problem every once in a while, but after two or three restarts of debugging I could use it. Unfortunately, since the latest update to version 0.14.4, I have not been able to attach successfully to the program.
I am using debugging by attaching to a remote program with the following entries in launch.json:
{
"name": "Debug Remote",
"type": "cppdbg",
"request": "attach",
"program": "...",
"processId": "${command:pickRemoteProcess}",
"sourceFileMap": {
"...": "..."
},
"pipeTransport": {
"pipeCwd": "/usr/bin",
"pipeProgram": "/usr/bin/ssh",
"pipeArgs": [
"..."
],
"debuggerPath": "/usr/bin/gdb"
},
"osx": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
}
After starting debugging, gdb attaches to the program, but shortly after displaying the stack trace, the debugger crashes with error messages like:
"Unexpected token C in JSON at position 2110. Der Debugadapter wird beendet."
Sometimes the token is empty and sometimes it is something different than "C". Also the position is always different. The number of those messages per start ranges from 1 to 5.
I always had this problem every once in a while, but after two or three restarts of debugging I could use it. Unfortunately, since the latest update to version 0.14.4, I have not been able to attach successfully to the program.