Would anyone know of any decent stand alone debuggers for OSX that can use LLDB? (I don't think Xcode supports this mode).
There is a thread on Linux standalone debuggers and they recommended DDD, but that seems that it requires GDB (which I could install with MacPorts) and it seems to be very difficult to use. How compatible are Clang built executables with GDB?
Sorry, what I meant by "doesn't support this mode", I was referring to a standalone debug mode, not to the usage LLDB (I am aware that Xcode only uses LLDB). However, I am not aware of a mode where I can just debug an executable in Xcode without having to first create a project, a la DDD or Visual Studio.
Well, it ends up being the same as VS, but you need to manually do it.
Step 1: Create a new Project using the OS X -> Other -> Empty template. (I put this project in handmade/misc/osx/HandmadeHero.xcodeproj).
Step 2: Create a new scheme (I named mine Handemade Hero)
Step 3: Edit the scheme, under "Run", set the executable to the path to your binary
This allows you to debug the executable now. To break on main, add a symbolic breakpoint.
There's no need to add the files to the project; you can set breakpoints without it. Also, then you don't need to manage multiple different project systems. You just need to the hook for debugging that you set up once instead of having to maintain throughout the life time of your project.