Debugging CmdStan model (on macOS)

It seems that, on macOS, CmdStan’s automatic removal of the model object file ($model.o) prevents lldb or gdb from having any debug info. Is this intentional? If so, is there a better way to debug the model executable?

On Ubuntu, the debug info seems built into the executable.

removing the object file is intentional. preventing debugging is not.

maybe quite the right set of compiler flags? cf macos - No debug info / source code with LLDB on OSX - Stack Overflow

Sorry, was unfortunate wording, I didn’t mean to imply that; just that it may accidentally prevent debugging.

I’m setting CXXFLAGS='-g -Og' and there’s no LTO happening according to the Make output.