Skip to content

Instantly share code, notes, and snippets.

@RednibCoding
Last active October 10, 2025 22:24
Show Gist options
  • Select an option

  • Save RednibCoding/0c2258213a293a606542be2035846a7d to your computer and use it in GitHub Desktop.

Select an option

Save RednibCoding/0c2258213a293a606542be2035846a7d to your computer and use it in GitHub Desktop.
Odin debugging on windows with vscode. See: readme

Setup

To setup debugging for Odin programs on Windows with VsCode follow these steps:

  • make sure you have the C/C++ extension pack (VsCode extension) installed
  • create a .vscode folder at the root of your Odin project
  • copy the launch.json and tasks.json into it
  • click on the debug tab in VsCode, then click on the debug button at the top (or press F5)

Note: if you want to use a starter template which also sets up a tracking allocator which tracks and reports memory leaks you can use: https://github.com/RednibCoding/Odin-Starter

FAQ

Q: When I start debugging, I get the following error popup: Configured debug type 'cppvsdbg' is not supported.

A: Make sure you have the C/C++ extension pack installed. If it is already installed, try reinstalling it.

{
"version": "0.2.0",
"configurations": [
{
"type": "cppvsdbg",
"request": "launch",
"preLaunchTask": "Build",
"name": "Debug",
"program": "${workspaceFolder}/build/debug.exe",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
{
"version": "2.0.0",
"command": "",
"args": [],
"tasks": [
{
"label": "mkdir",
"type": "shell",
"command": "cmd",
"args": [
"/C",
"if not exist .\\build mkdir .\\build"
]
},
{
"label": "build",
"type": "shell",
"command": "odin build . -debug -out:build/debug.exe",
"group": "build"
},
{
"label": "Build",
"dependsOn": [
"mkdir",
"build"
]
}
]
}
@FROSTdrgn
Copy link

For people on linux, cppvsdbg doesn't work, but lldb works fine (I used the more frequently installed extension for lldb, vadimcn.vscode-lldb; note that there's another more official one)

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lldb",
            "request": "launch",
            "preLaunchTask": "Build",
            "name": "Debug",
            "program": "${workspaceFolder}/build/game.bin",
            "args": [],
            "cwd": "${workspaceFolder}"
        }
    ]
}

I use make so keeping it simple,

{
    "version": "2.0.0",
    "command": "",
    "args": [],
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "make build",
            "group": "build"
        }
    ]
}

@RaymondRM1
Copy link

Amazing thank you. Unlike every other thing about odin this was an easy google search and find. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment