Jump to content
Lars Fosdal

Delphi 11.1 + patches - No debug source / breakpoints?

Recommended Posts

I have the weirdest issue.  I just installed a fresh Delphi 11.1 + patches on a new, fully patched Windows 10 Enterprise laptop.

For some weird reason - I can't debug.  Breakpoints don't break.  Exceptions break shows assembly code, says it is mixed mode, but no source lines show, and I can't trace to next sourceline.

 

Yes, I am in 32-bit debug mode. 
Yes, the project has the debug settings and debug info included. 
Yes, the output folders have full access for the current user.

Yes, there is only one set of DCUs in the path.
Yes, there is only one .EXE file.
Edit:
Yes, they are debug DCUs
Yes, line endings are CRLF

Yes, current user has local admin rights

As soon as my app starts, the breakpoints are grayed out.

 

Edit 2:
It does not happen to all apps. 
The problem app is about 600k lines. 
Tiny apps and a larger 1100k line app - no problems.

 

What am I missing?

 

Update - Possible causes?
A developer on a non-corporate laptop does not have this problem.

Another developer on corporate laptops have the same problem as me on both new and old laptops.

That seems to indicate a Windows policy may be a factor here.

 


Anyways - workaround:

Project | Options | Linking | Include remote debug symbols: A tick here gave working breakpoints for us.

Share this post


Link to post
4 minutes ago, Lars Fosdal said:

Yes, there is only one set of DCUs in the path.

and they are debug dcu's? (Use debug .dcus)

Edited by Attila Kovacs

Share this post


Link to post

I don't know please tell us. I have had a situation when I was unable to debug a package with one exe.  Changed the application that is used for debugging (host application) then the break point worked every time. Next week I was able to debug with both applications.

 

Share this post


Link to post

ok, well, I'd try clean/build or remove the .dproj and reconfigure the project.. is this the only one IDE installed on that machine?

Share this post


Link to post

Yes - clean machine - clean install - no previous Delphis - and the .dproj files came from a repository also maintained with Delphi 11.1.

Share this post


Link to post
3 minutes ago, Fr0sT.Brutal said:

Test project - the same?

Yes - started a new project. Same problem.

No! I closed all projects, then tried again with a brand new project. 
That worked.


 

  • Like 1

Share this post


Link to post

Deleting the .dproj did solve the problem. I compared the newly created to the old one, and there was a huge amount of crap in the old one.  But, why does it work on the old installation?

  • Like 1

Share this post


Link to post

The plot thickens: 

I deleted the .dproj for a specific app.  Debugging worked.

I opened a project group- containing the same app.  Debugging stopped working.

Guess I need to rebuild that too.

 

Strike that. I ran the wrong project ><

Share this post


Link to post

The downside of deleting the .dproj file.

Output path, search path, dcu output path, and EurekaLog needs to be reconfigured.  Oh, such joy.

  • Like 1

Share this post


Link to post

Another app, same problem - except this time, deleting the .dproj did not solve the problem.

WTF is going on?

Share this post


Link to post
2 hours ago, Lars Fosdal said:

and there was a huge amount of crap in the old one.

Any changes to validate file contents? If you found garbage in the ".DPROJ", then other files could be contaminated as well....

Was there any strange situation when copying the files?

 

Just lingering on about possible issues with the source files...

  • Remembering the old D.O.S./Windows 3.1, don't laugh, it was very easy to get a corrupt disk block and have our files buggy, and sometimes unreadable forever...

Share this post


Link to post
2 minutes ago, programmerdelphi2k said:
  • it was very easy to get a corrupt disk block and have our files buggy, and sometimes unreadable forever...

I would definitely start to look at the hardware

Share this post


Link to post

Fresh checkout from Git. Compiler does not complain. Program executes fine.  It just that it doesn't appear to be in debug mode.  

Share this post


Link to post

I once had a problem with a ".pas" not compiling, and, after much thought, the problem was that the file had been changed, for some reason, to a "UNICODE" where control characters (ghosts) had been found (however, they were not visible to the human eye, naturally)...


Solution: I had to redo the file, because even copying it to a non-unicode editor didn't work at all!

Share this post


Link to post

Switched to Release, builded, exited Delphi.

Restarted Delphi, switched to Debug, builded, ran - no change.

 

No weird characters.  Opens fine in TextPad, Notepad, VS Code and IDE.

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

×