Jump to content
Lars Fosdal

Delphi 11.1 + patches - No debug source / breakpoints?

Recommended Posts

It's prob not relevant to your problem, but I've run into a similar issue were the debugging doesn't work on my company laptop, but does on my own PC. I use the same VirtualBox VM on both (I copy the VM files over), so the RAD Studio installation and all the project files are the same on both machines. In my case it's an Android app and I can set breakpoints etc on the company PC but they are just ignored and the app never stops at a breakpoint. The company laptop has a bunch of AV/anti-malware stuff on it so I just assume that's the cause.

Share this post


Link to post
On 12/20/2022 at 5:21 AM, Lars Fosdal said:

It is odd that it works with remote debug symbols enabled, though.

So yesterday I began to have this problem with 11.1 in a VM. Did some searching this morning, and that led me to this thread, which I recall reading when it was new.

My situation is not identical, Lars, as I do not see the color of gutter dots change. But breakpoints become non-functional, depending on where they are. I can break in the DPR, or in the main form. But somewhere beyond those areas, the breakpoints do not trigger.

Have you discovered the cause? I was going to check include remote symbols, and found it already checked, so that is not a solution here. 

Share this post


Link to post

No, not really.  Very little Delphi work these days, as I am trying to get my head around an ERP system and all its wrinkles.

Share this post


Link to post

@Lars.
Updates on this?
I have a similar problem where debugging in Delphi 11.3 works.... for a while. Then suddenly all breakpoints are ignored. (Suddenly = I change one line a code and I recompile).
I can't even put a breakpoint into the DPR!

The project is properly set. I even turned on "map file" and "debug info into exe" in the Linker page.


The project is really really large:

Exe file (with debug info inside) 191MB. 

Exe file (without debug info inside) 51MB. 

Map file = 43MB. 

DCUs = 4MB (the rest is in (DPK) libraries).
 

Edited by GabrielMoraru

Share this post


Link to post

Sorry, no updates.  Not using Delphi much, except from small utils. Haven't checked on the problem since 12.3.

Share this post


Link to post

I have some hints that it might be related to the DProj file.
But then, suddenly the bug went away and I cannot reproduce it anymore.
I will have to wait for it to reappear then I can continue the experiments.

 

Share this post


Link to post

Not sure if this helps: Breakpoints are stored in the DSK file. Depending on whether you opened a project group or a standalone project (with that temporary project group created on the fly) this is the DSK file of the project group or the project. 

Share this post


Link to post
25 minutes ago, Uwe Raabe said:

Not sure if this helps: Breakpoints are stored in the DSK file. Depending on whether you opened a project group or a standalone project (with that temporary project group created on the fly) this is the DSK file of the project group or the project. 

Thanks. But this is way beyond that. I think that under certain conditions, the linker simply does not put the debug information into the DCU or EXE file. Or if it is there, the debugger cannot use it. My environment is identical with Lars' except " current user has local admin rights".

It is quite random... Today works, tomorrow not.
Restarting the IDE helped in 2-3 cases but not in other 10-15.
Until now only the code in packages (dpk) was not available for debugging. 

Once, I rebuilt all packages in a certain order and then I was able to debug again.
 

Friday was the first time when it happen in the project (dpr) itself. But as I said... suddenly it fixed itself so I cannot experiment anymore.

The DProj files are very old and I have seen strange lines in there. Lines that are not in a fresh DProj file. I tried to remove those lines one by one, trying to find the offending one.


This (broken DProj file) is only a supposition. Until now I strongly believed that it has something to do with the package. 

But Friday I removed every reference to any external units from the dpr file (except VCL.Dialogs and VCL.forms), cleaned up the DCU folder and it still happened. So, IT IS NOT related to packages.
There was only a ShowMessage in the DPR file and it still won't stop there, at that line.
 

uses
  //FastMM4,
  vcl.Forms,
  vcl.Dialogs;

begin
  //Application.Initialize;
  //Application.MainFormOnTaskbar := True;
  ShowMessage('Worked!');  // Breakpoint
  //Application.CreateForm(TForm1, Form1);
  //Application.Run;  
end.

______

Normally the exe file is 55MB, and the size is not coming from internal resources and images but from code 🙂
I backed up the exe file and the DCU folder, now that debugging works. I will wait until it doesn't and I will compare the binary files, see if they are smaller.

Edited by GabrielMoraru

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×