NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Just-In-Time Debugging and Crash Dumps

Just-in-time debugging is a technique for debugging a program that is started outside of Visual Studio. If you have enabled Just-in-time debugging, you can run a program created in Visual Studio outside of the Visual Studio environment. The program will run as normal until an error occurs. At that point, it will launch Visual Studio for debugging.

To enable Just-In-Time debugging

  1. From the Tools menu, select Options.
  2. In the Options dialog box, select the Debugging folder.
  3. In the Debugging folder, select the General Category.
  4. In the Just-In-Time Debugging/Attach group, select Just-In-Time Debugger.
  5. Optional: If you want to enable Just-in-time debugging for certain types of programs only, click on the On This Machine button.
    1. In the Debugger Properties dialog box, in the Program Types box, select the program type you want to enable or disable Just-in-time debugging for (NGWS runtime or Win32 applications, for example).
    2. Select or clear the Allow JIT debugging by this debugger check box.
    3. Click OK.
  6. If you have another debugger installed, select Default Just-In-Time debugger. This will prevent the other debugger from taking control when the crash occurs.
  7. Click OK.

When you are using the Visual Studio debugger, you can save a crash dump file for debugging at a later time. You can debug a crash dump file on another machine or even send it to another developer as an email attachment. You can save a crash dump at any time, but this feature can be especially useful in conjunction with Just-in-time debugging. When a crash occurs and Just-in-time debugging launches Visual Studio, you have the option of saving a crash dump instead of debugging the file immediately. This can be useful if you are testing the program on a machine that does not have source files installed. When the crash occurs, you can save a crash dump file and debug it later on the machine that has the source files.

To save a crash dump file

To open a crash dump file

  1. From the File menu, choose Open and click File.
  2. In the Open File dialog box, locate and select the crash dump file. (It will have a .dmp extension.)
  3. Click OK.

See Also

Using the Debugger