F12在Windows 7/8上不能在Delphi调试器中工作 [英] F12 not working in Delphi debugger on Windows 7/8

查看:231
本文介绍了F12在Windows 7/8上不能在Delphi调试器中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调试器中运行程序时按F12可能会中断执行并打开调试器。这在Windows XP(在D2007和XE2上测试)上可以正常工作,但在Windows 7和8(在D2007和XE2上测试;在三台计算机上测试)中失败。



注册表设置正确(Windows 7):


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
UserDebuggerHotKey= dword:00000000
Debugger=\C:\Windows\system32\vsjitdebugger.exe\-p%ld -e%ld p>

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\AutoExclusionList]
DWM.exe= dword:00000001


XP安装还设置Auto=1,省略AutoExclusionList,但在Windows 7机器上复制这些更改完全没有。 / p>

奇怪的是,Delphi似乎知道F12被按下。当我在Windows 7机器上的调试器中运行程序并按F12时,Delphi中的事件日志窗口显示


线程开始:线程ID :4080. Process Project73.exe(7108)



线程退出:线程ID:4080.进程Project73.exe(7108)


< blockquote>

只是断点不被触发,应用程序不断运行。



有人知道如何恢复这个功能Windows 7/8?

解决方案

调试器看到Windows启动了一个新线程,但不知道该怎么做线程是。在XP中,这个线程运行到一个 int 3 断点( DebugBreak()),但在Vista和Windows 7+即使您设置了注册表项,断点也不会被击中。



存在一个Delphi IDE插件,捕获线程并调用DebugBreak()WinAPI函数。
http://andy.jgknet.de/blog/ide-tools/unsupported-tools /


Pressing F12 while the program is running in the debugger should break the execution and open the debugger. This works correctly on Windows XP (tested with D2007 and XE2) but fails on Windows 7 and 8 (also tested with D2007 and XE2; tested on three computers).

Registry is set up properly (Windows 7):

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

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\AutoExclusionList] "DWM.exe"=dword:00000001

The XP installation also sets "Auto"="1" and omits the AutoExclusionList but duplicating those changes on the Windows 7 machine accomplishes nothing.

The weird thing is that Delphi seems to be aware of the F12 being pressed. When I run a program in a debugger on a Windows 7 machine and press F12, Event Log window in Delphi shows

Thread Start: Thread ID: 4080. Process Project73.exe (7108)

Thread Exit: Thread ID: 4080. Process Project73.exe (7108)

It's just that the breakpoint is not triggered and application keeps running.

Does anybody know how to restore this functionality in Windows 7/8?

解决方案

The Debugger sees that a new thread is started by Windows, but it doesn't know what that thread is. In XP this thread runs into a int 3 break point (DebugBreak()), but under Vista and Windows 7+ the breakpoint isn't hit anymore even if you set the registry key.

There exists a Delphi IDE plugin that catches the thread and calls the DebugBreak() WinAPI function. http://andy.jgknet.de/blog/ide-tools/unsupported-tools/

这篇关于F12在Windows 7/8上不能在Delphi调试器中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆