首页  编辑  

在XP中调试DLL,Attach无法下断点

Tags: /超级猛料/IDE.集成开发环境/编译、调试/   Date Created:

如果在Delphi中,Attach一个进程(例如)调试服务的时候,无法下断点或者在断点处停下来的话,请修改Project Options,把Output Directories修改为绝对路径表示的即可。

---------------------------------------

在XP中,如果在DLL中下断点,Delphi不会中断下来,怎么回事儿呢?(恐怕又是M$的诡计,:))

解决方法:

Until up to Win2k, you had to set the HostApplication on Start=>Parameter to

debug a DLL. This will not work on Windows XP.

在Win2K中,你可以设置Run-->Parameter对话框中的HostApplication来调试DLL,但是在WinXP中,将不会正常工作!

That Delphi will know the DLL if you run the progam, you have to do the

following:

要让Delphi在运行程序的时候,知道你的DLL,你必须作如下的工作:

The program must load the DLL. After this, press Ctrl-Alt-M in Delphi, to list

all modules. Sometimes there will be the DLL with path.

首先,程序必须加载这个DLL,之后,请在Delphi中按Ctrl+Alt+M,这个时候会列出所有的模块,有一些模块回带有路径。

Solution:

解决方案:

Right click on the DLL, select "Reload symbols" and set the full path to the

DLL. Now the breakpoints should be active.

右击那个DLL,选择"Reload Symbols",并且设置这个DLL的全路径,设置之后,你的断点应该有效了。

When the DLL will be compiled in the system path (directory in PATH) this

problem dont occur.

如果DLL编译的输出目录在系统路径(PATH环境变量的路径中)中,那么不会出现这个问题。