#[Solved] Odin debug on MacOS

1 messages · Page 1 of 1 (latest)

real wraith
#

Hello,
I apologize in advance for the double post (#beginner) I'm trying to debug Odin on a mac os using visual code, but so far I haven't be able to do so. Do you have any suggestions?

worn plover
real wraith
#

@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

real wraith
#

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.
worn plover
abstract canyon
#

Can you run that binary without it crashing normally?

real wraith
#

yes

abstract canyon
#

The debug.bin?

real wraith
#

yes if I run lldb debug.bin I can step trough the program

#

I start to think is an issue with codelldb extension

abstract canyon
#

Probably not, I use codelldb through neovim and it works like a charm

worn plover
real wraith
#

I will give a try with another extension "Native Debug" will keep you posted

worn plover
#

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"
    }
}
real wraith
#

Will try and let you know

#

@worn plover thanks that it works like a charm

#

I also tried the "Native Debug" extension and work as well

#

Thanks for the effprt and help to you all