DebugBreak continue issue

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


I am trying the continue function triggered by JIT debugger. As mentioned in MSDN,

http://msdn2.microsoft.com/zh-cn/library/h22dk1y6(en-us).aspx

--------------------
Continue
Allows execution to continue, giving the exception handler a chance to handle the exception. This option is not available for certain types of exceptions. Continue will allow the application to continue. In a native application, it will cause the exception to be rethrown. In a managed application, it will either cause the program to terminate or the exception to be handled by a hosting application.
--------------------

I write the following program to try this feature and expect when click continue, the __except code block is executed, but actually even the JIT debugger is not displayed to let us select debugger. Do you know why and how to fix it to make it have expected function (when click continue, execute exception handler code block)?

Code:
#include "Windows.h"

int main()
{
	int a;
	int b;
	int c;

	__try 
    {
	
		a = 100;
		b = 200;
		c = 300;

		DebugBreak();
		a = 400;
	
    }
    __except(GetExceptionCode() == EXCEPTION_BREAKPOINT ? 
             EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) 
    {
        // No debugger is attached, so return FALSE 
        // and continue.
        return FALSE;
    }
	
    return TRUE;
}


thanks in advance,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top