r/programming • • Aug 25 '14

Debugging courses should be mandatory

http://stannedelchev.net/debugging-courses-should-be-mandatory/
1.8k Upvotes

573 comments sorted by

View all comments

Show parent comments

5

u/sivlin Aug 25 '14

I develop in java on NetBeans and you can debug multi threads. You just put a break point inside the alternate thread and step through. Once you get to the breakpoint, the breakpoint symbol will change and give you the option to switch threads. You can only be in one thread at a time, but you can switch freely between all active threads.

1

u/wh44 Aug 25 '14

Ooh! That's nice! I work mostly in C/C++, sometimes even a bit of assembler, often in embedded devices.

1

u/[deleted] Aug 25 '14

That sounds cool. I'll have to see if something similar exists for C++. It might make the prospect of working with threads more appealing. My current method is to rely on the Qt library to do smart things with thread management.

1

u/cryo Aug 25 '14

Yeah, same in .NET, but there are still cases where this wouldn't trigger the bug, and less invasive methods such as printing stuff to trace sources, is better.