Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_Crt???? debugging functions

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am making a console app with VC6.0 enterprise edition.

I use _CrtCheckMemory at various points to check the memory heap for corruption. Basically, if this function finds an error, I want the program to allow me to debug it. So I followed the _CrtCheckMemort test with an assert(0) statement, the idea being that the assertion will prompt me for debugging.

However, in order to get the output of _CrtCheckMemory to go into the debug window, I need to use _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG ); But when I have this selected, assert changes also: it stops prompting me for the debugger and just terminates the program with a message.

Why does this happen, and how can I get both _CrtCheckMemory to go to the debug window -and- get the program to halt execution so that I can debug it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top