加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

delphi – 如何远程调试使用运行时包构建的Win32 VCL应用程序

发布时间:2020-12-15 09:46:08 所属栏目:大数据 来源:网络整理
导读:我写了一个简单的VCL win32应用程序,它具有以下代码: procedure TForm5.Button1Click(Sender: TObject);begin ShowMessage('bingo');end; 我使用运行时包编译了应用程序并打开了以下开关: 调试信息 – 真正 包括远程调试符号 – 真正 断言,调试信息,本地符
我写了一个简单的VCL win32应用程序,它具有以下代码:

procedure TForm5.Button1Click(Sender: TObject);
begin
  ShowMessage('bingo');
end;

我使用运行时包编译了应用程序并打开了以下开关:

>调试信息 – >真正
>包括远程调试符号 – >真正
>断言,调试信息,本地符号,使用调试dcus – >真正

输出包含以下文件:

> Project1.exe
> project1.rsm

两个运行时包是:

> vcl160.bpl
> rtl160.bpl

我在Button1Click处理程序中设置了一个断点,如果我运行,本地IDE调试器将停在那里
在调试器模式下应用程序.

接下来,我想尝试使用运行时包远程调试应用程序.

我将远程配置文件分配给32位Windows平台.测试连接与远程配置文件一起使用. PAServer也是在远程机器中启动的.当我尝试使用Delphi XE2 IDE调试器运行应用程序时,我注意到有4个文件被复制到远程机器:

> Project1.exe
> project1.rsm
> vcl160.bpl
> rtl160.bpl

但是,事件日志显示:

Module Load: Project1.exe. No Debug Info. Base Address: $00400000. Process Project1.exe (1676)

由于模块没有调试信息,因此所有断点都将无法触发.

我已经尝试构建没有运行时包的单个文件.exe应用程序.相同的远程调试器步骤工作,我可以远程调试应用程序.

使用运行时包构建的应用程序使远程调试失败的原因是什么?

解决方法

看起来你必须另外部署与使用的运行时包相对应的’.dcp’文件.

从Debugger Notes(XE2发行说明):

Ensure Debug Information by Adding .dcp Files to Application
Deployment

If your Delphi application links with run-time packages,the expected
debug information might not be generated. This is true for Mac OS X
applications and for remote Win64 or remote Win32 applications. The
workaround is to use the Deployment Manager to add the .dcp files that
correspond to the run-time packages in your run-time package list. For
instance,if you are using rtl,you must deploy the rtl.dcp file.

Use the .dcp files located in the EmbarcaderoRad Studio9.0lib
directories,as follows:

  • For an OS X application: EmbarcaderoRad Studio9.0libosxrelease
  • For a remote 64-bit Windows application: EmbarcaderoRad Studio9.0libwin64release
  • For a remote 32-bit Windows application: EmbarcaderoRad Studio9.0libwin32release

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读