I wrote a simple VCL win32 application that has the following code:
procedure TForm5.Button1Click(Sender: TObject);
begin
ShowMessage('bingo');
end;
I compiled the application with runtime packages and has turn on the following switches:
The output has the following files:
The two runtime packages are:
I set a break point in Button1Click handler, the local IDE debugger will stop there if I run the application in debugger mode.
Next, I want to try remote debug the application with runtime packages.
I assign remote profile to the 32-bits windows platform. The test connection works with the remote profile. PAServer was started too in remote machine. I can notice 4 files were copied to remote machine when attempt to run the application with Delphi XE2 IDE debugger:
However, the event log shows:
Module Load: Project1.exe. No Debug Info. Base Address: $00400000. Process Project1.exe (1676)
As the module doesn't has debug info, all breakpoint will fail to trigger.
I have tried build single file .exe application without runtime packages. The same remote debugger steps work and I can debug application remotely.
What has make the remote debugging fail with application built with runtime packages?
Set up the remote debugger. On the remote computer, find and start the Remote Debugger from the Start menu. If you don't have administrative permissions on the remote computer, right-click the Remote Debugger app and select Run as administrator. Otherwise, just start it normally.
You can attach the Visual Studio debugger to a running process on a local or remote computer. After the process is running, select Debug > Attach to Process or press Ctrl+Alt+p in Visual Studio, and use the Attach to Process dialog to attach the debugger to the process.
Using a browser, open the administration console of the remote application server. Expand the Servers node and click Application Servers. Click the name of the server to open the application server properties. Click Debugging Service.
In Solution Explorer, right-click the project, and click Publish. In the Profile drop-down list, select the same profile that you used in Create an ASP.NET app in Azure App Service. Then, click Settings. In the Publish dialog, click the Settings tab, and then change Configuration to Debug, and then click Save.
It looks like you have to additionaly deploy '.dcp' files corresponding to used runtime packages.
From Debugger Notes (Release Notes for 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 Embarcadero\Rad Studio\9.0\lib directories, as follows:
- For an OS X application: Embarcadero\Rad Studio\9.0\lib\osx\release
- For a remote 64-bit Windows application: Embarcadero\Rad Studio\9.0\lib\win64\release
- For a remote 32-bit Windows application: Embarcadero\Rad Studio\9.0\lib\win32\release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With