Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agreed. I like to compile most translation units with -O3 and then only compile the translation units that I want to debug with -O0. That way I can often end up with a binary that's reasonably fast but still debuggable for the parts that I care about.


Yup that’s what I’ve resorted to (in Rust I do it at the crate level instead of translation unit). The only downside is forgetting about it and then wondering why stepping through is failing to work properly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: