Skip to Main Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced content levelIntermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
Debug a Failing Application #42
Chapter 5, Debugging
|
165
HACK
—Ben Von Handorf
HACK
#42
Debug a Failing Application Hack #42
Launch the debugger when an application starts to crash.
Just-in-time debugging, or JIT debugging for short, is the ability to attach to
a running program that has failed by throwing an unhandled exception. For
instance, you might be testing an application, but not running the applica-
tion in the debugger, and the application throws an exception. Without JIT
debugging, you would have to try and reproduce the error after restarting
the application in the debugger. With JIT debugging, you can immediately
attach to the program and investigate the exception.
JIT debugging does not have anything to do with Just-in-
time compilation; the abbreviation may mean the same thing
but represents vastly different things. Just-in-time compila-
tion is the part of the Common Language Runtime that com-
piles intermediate language into machine code “just in time”
for the machine to process it. (Literally when you call a
method, the JIT compiler checks to make sure the code for
that method exists; if it does not, then it is compiled from
the IL [Hack #63].)
Using JIT Debugging
Using JIT debugging is pretty simple. When you are running an application
that throws an unhandled exception, you will see the dialog shown in
Figure 5-30.
The Just-in-Time Debugging dialog offers you a number of different debug- ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Visual Studio 2015 Unleashed, Third Edition

Microsoft Visual Studio 2015 Unleashed, Third Edition

Mike Snell, Lars Powers
.Net Framework Essentials

.Net Framework Essentials

Thuan L. Thai, Hoang Lam
C# 5.0 Unleashed

C# 5.0 Unleashed

Bart De Smet
Programming .NET Security

Programming .NET Security

Adam Freeman, Allen Jones

Publisher Resources

ISBN: 0596008473Errata Page