DebugBreak continue issue



Hello everyone,


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

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

--------------------
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;
}
[/Code]


thanks in advance,
George

.



Relevant Pages

  • Re: 64b Windows - crashes not detected
    ... When you have the NULL pointer reference that should trigger an access violation, is it perhaps in a message handler that has come from a SendMessage call? ... a structured exception that would trigger an unwind to an exception handler back into kernel mode will simply be "swallowed" by the OS. ... If I understand you correctly, you are talking only about what gets trapped by the debugger, not what will be caught by exception handlers in your code. ...
    (microsoft.public.vc.mfc)
  • Re: Focus problems on return from dialog ...
    ... You have to tell the DEBUGGER, not the CODE, you are TELLing the code. ... Raising an exception causes the exception dispatcher to go through the ... exception handler by searching the stack frames of the thread in which the ... proceeds backward through preceding stack frames. ...
    (alt.comp.lang.borland-delphi)
  • Re: Try..Except: How?
    ... stops execution when run under the debugger.. ... if you tell the debugger to allow your program to continue running. ... So far, it's just paused at the point of the exception to let you, the developer, inspect the state of your program and determine the error that caused the exception to be raised in the first place. ... When an exception occurs and your program displays a message box with the exception's message, that's a result of TApplication's default exception handler. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Possible reasons for a C++ exception being thrown for line three?
    ... Does the catchcatch the exception? ... It looks like its an access violation, ... Run the release version under the debugger. ... exception handler somewhere in your code that throws a C++ ...
    (microsoft.public.vc.mfc)
  • Re: Debugging Apllication
    ... Exception handling is much slower when the debugger is attached, so if a lot of exceptions are being thrown, execution can slow down a lot under the debugger. ... Generally speaking, it's telling you that something executed some code that shouldn't be executed while a DLL is loading, even though a DLL was in fact loading. ...
    (microsoft.public.dotnet.languages.csharp)