views:

28

answers:

1

I have a small Win32 console application and when executing from the debugger the console takes about five seconds to appear. If I place a breakpoint on the last line of main, the break point is hit immediately, so the application is already finished but the console does not appear for about five seconds. I have removed all my breakpoints using 'Remove All Breakpoints', restarted Visual Studio. No dice. The console appears very quickly launching outside of the debugger, using CTRL-F5. Any ideas? Thanks

A: 

Debugging an application causes all sorts of notifications to be sent to the debugger - all DLL loads, thread creates, etc. The debugger may be loading symbols during this time as well. All of this will slow down the launch of the process and it'll take longer to get to the point where it creates the console.

Michael