#[Solved] Odin debug on MacOS
1 messages · Page 1 of 1 (latest)
You can use an lldb debug config. Here's a simple one: https://github.com/harold-b/darwodin/blob/master/.vscode/launch.json
@worn plover I tried lldb but the debugger pass the break points without stop
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/debug.bin",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "build-debug"
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "build-debug",
"type": "shell",
"command": "odin build . -debug -out:debug.bin",
},
]
}
I'm using codelldb extension in vscode
Not sure if this can help to shine some light but in the Debug Console I get the following
Console is in 'commands' mode, prefix expressions with '?'.
Launching: /Users/sru/repos/odin/game/debug.bin
Launched process 44269
Process exited with code -1.
Try making sure optimizations are disabled, just in case: -o:none
Can you run that binary without it crashing normally?
yes
The debug.bin?
yes if I run lldb debug.bin I can step trough the program
I start to think is an issue with codelldb extension
Probably not, I use codelldb through neovim and it works like a charm
I've used codelldb too without issues in vscode, but you can also give the MS C++ one a try: https://code.visualstudio.com/docs/cpp/cpp-debug
I will give a try with another extension "Native Debug" will keep you posted
I just tried w/ the offical MS CPP extension too w/ no problem:
{
"type": "cppdbg",
"request": "launch",
"name": "Debug macOS",
"program": "${workspaceFolder}/debug.bin",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "build-debug",
"osx": {
"MIMode": "lldb"
}
}