A just-in-time debugger is a program registered with a user's operating system of choice such that it will intervene at the moment a program crashes and allow a programmer (or simply an expert) to examine the state of the crashing program and determine exactly why it died violently.

When a program crashes, the operating system is, in effect, forcing it to exit abnormally. Since the operating system is taking over and interrupting the usual control flow, it is very aware of the crash, and can take the opportunity to run another program as a result. A debugger is ideal here, as it allows for examination of the memory of the dying software, including its call stack, and the programmer can often immediately determine the bug that resulted in the software's untimely demise.

Microsoft Windows from XP onward comes with a built-in just-in-time debugger. Also known as Watson32 (or Watson64, for the 64-bit edition), Online Crash Analysis takes a memory dump of your program, strips the dump down to what it thinks is the minimal amount of data required to identify the crash, packages it up, and sends it off to Microsoft, where it is compared against a database of a whole bunch of other crash dumps, and categorized as a result. Microsoft uses the size of these crash buckets to decide which crashes to fix first for internal software, and information about third-party software is sent on to those third parties. When a bug is fixed, a special entry is made in the crash database to let Windows give you that nifty little "there's a fix for that" dialog box.

Online crash analysis is extremely useful for average users, but power users would probably prefer to analyze the problem themselves, which is why any program can be registered as a just-in-time debugger. Not all programs would know what to do with a pointer to debugging information if they're handed one and told to start, so it is recommended to only use an actual debugger for the purpose.

"Just-in-time debugger" is something of a misnomer. As the program has already crashed, it can more reasonably be called a "not-quite-in-time debugger".

Log in or register to write something here or to contact authors.