Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Just in Time debugger is not working

583 views
Skip to first unread message

Dave Calkins

unread,
Jul 15, 2009, 3:55:01 PM7/15/09
to
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

unread,
Jul 15, 2009, 11:46:19 PM7/15/09
to

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

unread,
Jul 17, 2009, 3:35:01 PM7/17/09
to
"Scot T Brennecke" wrote:

> 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]

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

unread,
Jul 19, 2009, 5:24:57 PM7/19/09
to
I don't know about XP 64 in particular, but other 64 bit Windows have two AeDebug entries. 

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


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

and

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"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).

Dave Calkins

unread,
Jul 20, 2009, 10:15:01 AM7/20/09
to

"Gerard O'Brien" wrote:

> 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

unread,
Jul 21, 2009, 12:16:13 AM7/21/09
to

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)?

0 new messages