Discussion:
Just in Time debugger is not working
(too old to reply)
Dave Calkins
2009-07-15 19:55:01 UTC
Permalink
I'm running Windows XP Pro x64 SP 2 and am using Visual Studio 2005 SP2. I'm
working on a native MFC project in Visual C++.

I've noticed in recent months that the Just in Time debugging feature
doesn't seem to work any more. For example, I compile and run a debug build
of my code. A crash occurs, and I get the "YouApp has encountered a problem
and needs to close." dialog. I click the Debug button and the dialog appears
again. I click the Debug button again, and the app just closes.

I never get a prompt to select the current or new instance of VS and never
get into the debugger.

I thought maybe the JIT settings for VS had become corrupt so I went into
the VS options>>debugging>>JIT and turned off JIT support, exited, came back
in and turned it back on.

This didn't help. Any ideas what would prevent VS JIT from triggering? Is
there some other technique to tell VS to re-assert itself as the JIT debugger
and perform the necessary machine config to get this working again?
Scot T Brennecke
2009-07-16 03:46:19 UTC
Permalink
Post by Dave Calkins
I'm running Windows XP Pro x64 SP 2 and am using Visual Studio 2005 SP2. I'm
working on a native MFC project in Visual C++.
I've noticed in recent months that the Just in Time debugging feature
doesn't seem to work any more. For example, I compile and run a debug build
of my code. A crash occurs, and I get the "YouApp has encountered a problem
and needs to close." dialog. I click the Debug button and the dialog appears
again. I click the Debug button again, and the app just closes.
I never get a prompt to select the current or new instance of VS and never
get into the debugger.
I thought maybe the JIT settings for VS had become corrupt so I went into
the VS options>>debugging>>JIT and turned off JIT support, exited, came back
in and turned it back on.
This didn't help. Any ideas what would prevent VS JIT from triggering? Is
there some other technique to tell VS to re-assert itself as the JIT debugger
and perform the necessary machine config to get this working again?
What do you see in the registry under these keys?:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\win.ini [AeDebug value]
Dave Calkins
2009-07-17 19:35:01 UTC
Permalink
Post by Scot T Brennecke
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\win.ini [AeDebug value]
For the AeDebug key I get the below (exported to .reg file):

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="\"C:\\WINDOWS\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
"UserDebuggerHotKey"=dword:00000000

For the win.ini key (AeDebug value) I get the below:

SYS:Microsoft\Windows NT\CurrentVersion\AeDebug
Gerard O'Brien
2009-07-19 21:24:57 UTC
Permalink
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#3333ff">
Dave Calkins wrote:
<blockquote
cite="mid:CD935C01-44EC-4753-841B-***@microsoft.com"
type="cite">
<pre wrap="">"Scot T Brennecke" wrote:

</pre>
<blockquote type="cite">
<pre wrap="">What do you see in the registry under these keys?:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\win.ini [AeDebug value]
</pre>
</blockquote>
<pre wrap=""><!---->
For the AeDebug key I get the below (exported to .reg file):

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="\"C:\\WINDOWS\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
"UserDebuggerHotKey"=dword:00000000

For the win.ini key (AeDebug value) I get the below:

SYS:Microsoft\Windows NT\CurrentVersion\AeDebug

</pre>
</blockquote>
<font size="-1"><font face="Verdana">I don't know about XP 64 in
particular, but other 64 bit Windows have two AeDebug entries.  <br>
<br>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
is the entry that is used for JIT when the process is a 64bit native
process, and<br>
</font></font><font size="-1"><font face="Verdana">HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug is the entry that is used for JIT when the
process is a 32bit process.<br>
<br>
On my system, currently, these have the following values<br>
<br>
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Auto"="1"<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"<br>
<br>
and<br>
<br>
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"<br>
"Auto"="1"<br>
<br>
There are times when I have the 64bit JIT set to the 64bit windbg
installation and the 32bit JIT set to the 32bit windbg installation
(they happily coexist).<br>
</font></font>
</body>
</html>
Dave Calkins
2009-07-20 14:15:01 UTC
Permalink
Post by Scot T Brennecke
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
is the entry that is used for JIT when the process is a 64bit native
process, and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug is the entry that is used for JIT when the
process is a 32bit process.
On my system, currently, these have the following values<br>
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Auto"="1"<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
and
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
"Auto"="1"
There are times when I have the 64bit JIT set to the 64bit windbg
installation and the 32bit JIT set to the 32bit windbg installation
(they happily coexist).
I checked the Wow6432Node and it was the same, except "Auto" was set to "0".
I changed it to "1", but it made no difference. When my app crashes, I get
the dialog, click Debug, get the dialog again, click Debug again, and the app
then just exits and never even attempts to go to the debugger as far as I can
tell.
Scot T Brennecke
2009-07-21 04:16:13 UTC
Permalink
Post by Dave Calkins
Post by Scot T Brennecke
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
is the entry that is used for JIT when the process is a 64bit native
process, and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug is the entry that is used for JIT when the
process is a 32bit process.
On my system, currently, these have the following values<br>
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Auto"="1"<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
and
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
NT\CurrentVersion\AeDebug]<br>
"Debugger"="\"C:\\Windows\\system32\\VSJitDebugger.exe\" -p %ld -e %ld"
"Auto"="1"
There are times when I have the 64bit JIT set to the 64bit windbg
installation and the 32bit JIT set to the 32bit windbg installation
(they happily coexist).
I checked the Wow6432Node and it was the same, except "Auto" was set to "0".
I changed it to "1", but it made no difference. When my app crashes, I get
the dialog, click Debug, get the dialog again, click Debug again, and the app
then just exits and never even attempts to go to the debugger as far as I can
tell.
I'm now of the opinion that Visual Studio itself is also throwing an exception when trying to launch it as the debugger, thus the
second debug popup and subsequent failure to launch the debugger.
Have you tried using WinDbg (at least temporarily) to see if it will launch as the "JIT debugger" (put it into the AeDebug keys)?
Loading...