0

Despite breakpoints hitting correctly, debug windows are not showing runtime values. They remain blank or unresponsive - making it frustrating to inspect variables during debugging. However in sometimes after build it works but sometimes doesn't work. Also i build it in Debug Build (Not Release Build). I have multiple projects in project group and i ensured the right project selected.

Values not showing in Delphi Debugger:

  • Watch List window
  • Local Variables window
  • Tooltip hover (when hovering over variables)

Building a Delphi (Delphi 10.4.2) project takes significantly longer than with many modern languages. Moreover, after a lengthy Build, often the Debugger still does not show runtime values, which is more frustrating.

Is there a reliable way to verify that the build not only succeeded, but also includes up to date debug information?

4
  • Which version of Delphi are you using? On which version of Windows? Commented Aug 29 at 3:55
  • @RemyLebeau Delphi 10.4.2 on Windows 10 Commented Aug 29 at 5:31
  • 1
    Check you AntiVirus software and Firewall settings. When debugging 64 bit or mobile applications Delphi is using PAServer . Since Delphi is communicating with PAServer through network connection it is possible that your AntiVirus or Firewall is causing interference. Commented Aug 29 at 7:53
  • This is probably not it, but the behavior you describe is what happens in Release build. Did you double check youre in debug build and do a full build? Commented Aug 30 at 14:03

1 Answer 1

1

Things to watch out for:

  • First one to check: if you have multiple projects in your group, make sure you have the right project selected. If you have a file open from another project, and you see a breakpoint, it doesn't mean that you're debugging it.

  • Check if you have release build or debug build.

  • And if you have breakpoints in VCL or RTL code, you set the compiler option to use debug dcu's.

  • When you make Delphi remember your breakpoints, they'll end up being stored based on line number in a file. After you pull changes from git (or some other VCS), the line numbers might no longer make sense.

  • Things get even messy if you have multiple .pas files or multiple DCU's or have the same code compiled into a .DCP package. You might compile and debug something else than you think you are. And Delphi doesn't complain. It just picks the first it finds.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.