1
$\begingroup$

I am trying to debug blender via gdb on Visual Studio Code. I have a launch.json file and it will open up blender but immediately close. I am not sure what is going on, has anyone successfully . Here is my json file:

{
// 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) Launch Blender",
        "type": "cppdbg",
        "request": "launch",
        "program": "path/to/bin/Debug/blender.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "path/to/bin/gdb.exe",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ],
        "preLaunchTask": "Build Blender Debugger"
    }
]

}

It seems to build but when it launches Blender it immediately closes. Any help would be greatly appreciated!

$\endgroup$
1
$\begingroup$

I found the issue is using gdb ... When I changed the debugger to be used cppvsdgp I was able to get it to launch and debug.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.