Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once you did setup debugging with GDB, you can use its features through VSCode by installing "GDB Debugger - Beyond" and configuring launch.json. Use the pickProcess feature to attach to and existing process (you can filter by name/port to find the correct one).

Example:

Code Block
languagejs
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Attach to impalad",
            "type": "cppdbg",
            "request": "attach",
            "program": "${workspaceFolder}/be/build/latest/service/impalad",
            "processId": "${command:pickProcess}",
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description":  "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

...