Read this blog post, I explained it all:
http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/
Short version
Exceptions crossing the user kernel boundary were lost on 64-bit Windows.
Starting with Windows 7, when a 64-bit application (that is, not 32-bit in a 64-bit OS) crashes, a notification about compatibility with the program appears. If the application does not have a Windows 7 manifest, a dialog box appears informing you that the PCA has applied the application compatibility pad.
The next time you run the application, Windows will emulate Server 2003 behavior and throw an exception.
To save these exceptions (as you want ), add the manifest entry "I am for Windows 7":
<assembly> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/ </application> </compatibility> </assembly>
source share