有源码,可以在DELPHI中进行源码级调试吗?

解决方案 »

  1.   

    可以
    1.在Run-Parameters-Host Appliction,选择宿主文件
    2.Project-Option中选择Debuging中的Debug information即可
      

  2.   

    试了,可以运行起exe, 但断点无效。不能调试,不知道哪里问题
      

  3.   

    delphi5,在XP的环境下会有这种事情发生。
      

  4.   

    d5 一样  用绝对路径 输出(option 的 output)
      

  5.   

    断点无效,你的EXE是调用你调试的这个DLL吗?
      

  6.   

    可以调试DLL,这个我做过,不过有点忘记了。1.在Run-Parameters-Host Appliction,选择宿主文件
    这个应该是:当前项目为DLL项目,运行的是DLL,DLL和EXE在项目组里面。2.Project-Option中选择Debuging中的Debug information即可
    这个应该是:EXE、DLL最好都选择编译DEBUG信息。
      

  7.   

    我这几天也在调试DLL,如一楼所说,在断点处可以停下,就是得到的值全是Accessible value!
    求解~
      

  8.   

    SOLUTION ABuild your DLL to the same directory as the DPR file.  If you just set the "Output Directory" entry to be empty on the
    Directories/Conditionals tab of the project options, then this will automatically happen.Either use this directory as your webserver's scripts or isapi directory, or move the DPR/DOF/CFG/RES files to your webserver's
    scripts or isapi directory.  If you do the later through the Delphi menu option File | Save Project As, the Delphi will fix up the
    directories of your source files in the uses section of the DPR for you.  It is not necessary to move the PAS files.That should be it.  Build and debug happily ever after.  The only downside to this is that you have to either change your webserver setup or move your project file to your scripts or isapi directory which is a annoying if you are using a source control system and you are the only one with this setup.
    SOLUTION BBefore compiling, change the linking options of your project to include Remote Debugging Symbols.Before debugging, open a file (an empty text file will do) from the directory your DLL is in.  That directory will become the current
    directory for Delphi.  When you start debugging, Delphi will correctly find your DLL and load its Symbol Table because it is in this
    directory.I don't like this solution because you have to always make sure that the directory your DLL is in always the current directory for Delphi before debugging.
    SOLUTION CBefore compiling, change the linking options of your project to include Remote Debugging Symbols.After you have started to debug, open the View | Debug Windows | Modules dialog.  Find the entry for your DLL.  If this is an isapi
    DLL, make sure you have made a request to the webserver so your DLL will already be loaded, otherwise you won't find it in this list. Right click on your DLL and choose "Reload Symbol Table..." and enter in the full path and filename for your DLL and click OK.  This will then properly load the Symbol Table.A downside to this solution (other than you have to do it every time) is that you can't debug any code the executes when your DLL is first loaded.
    Solution DI can't get any of the solutions to work, the only thing that works is when I manually define the dll path in View\DebugWindows\Modules.->Just wanted to tell you I got it working. I checked Remote Debug info in the linker tab, and now it works!一般有问题都是DLL和EXE在不同目录的情况下,在你指定不同输出目录时尤其常见。EXE,DLL和源码在同一目录肯定没有问题,有时需要你打开本目录一个源码文件,和因为delphi的当前目录也有关系。一般情况下,如果源码能调试了,再将host和输入文件指定到不同目录也是可以的。总之,这是一个问题,但它是一个可以解决的问题。
      

  9.   

    刚才试了一下,不错~
    调试Dll需要注意几点
    1.应用程序与dll源文件应放在一个目录下
    2.project--->option中的输出目录应设置为dll源文件的输出路径
    3.加宿主文件
    4.Project-Option中选择Debuging中的Debug information
      

  10.   

    重写一遍
    1.应用程序与dll源文件应放在一个目录下(例:c:\Import\)
    2.project--->option中的输出目录应设置为dll源文件的路径(c:\Import\)
    3.加宿主文件(Run-->parameters)
    4.Project-Option中选择Debuging中的Debug information
      

  11.   

    今天试了,是在Project->Option->Linker中选择Include TD32 debug info才能调试DLL,而且可以设断点^O^整个步骤如下:
    1.加宿主文件(Run--> parameters)
    2.Project->Option>Compiler中选择Debuging中的Debug information
    3.Project->Option->Linker中选择EXE and DLL options中的Include TD32 debug info应用程序与dll源文件可以不在一个目录下,project->option中Directories的输出目录也可以为空。
      

  12.   

    请教 Delphi5如何在XP系统下调试DLL啊。