My program is very hard to debug as it uses 2000 winsock threads running simultaneously exchanging data all the time. Recently though it has been crashing for no reason - no error message or anything.. it just goes poof. Is there any way to tell what caused the error, does windows keep a log file or anything? Adding statements to log every detail in the app would not work as the CPU use would just be too high..