Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save knavels/e1e59d244f1e9321fde2ad0918539a3e to your computer and use it in GitHub Desktop.
Save knavels/e1e59d244f1e9321fde2ad0918539a3e to your computer and use it in GitHub Desktop.
Odin debugging on windows with vscode. See: readme

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)
{
"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"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment