0

In one of my projects, I can't get breakpoints to work as expected.

The problem is that the CPU window opens when the breakpoint is reached. The Event Log correctly indicates the source line number with the breakpoint and the name of the file with the breakpoint indicated in the Event log matches the name and path of the source file open in the editor (the one where I placed the breakpoint).

However, when I try to inspect variables or view watches, I am told that the variable is undeclared. After the first breakpoint is reached, I can't set any additional breakpoints (the breakpoint is displayed as invalid -- a red dot with an X), even if it is the next line after the breakpoint (with a green arrow displayed). The Event Log indicates that the module has debug info.

I have tried the following:

Please offer suggestions regarding how to get the standard debugging functionality.

Ken White
  • 123,280
  • 14
  • 225
  • 444
TomT
  • 199
  • 1
  • 1
  • 11
  • You looked at both answers (not just the accepted one) in the link for Delphi 2010 (the first link), right? – Ken White Oct 13 '17 at 20:56
  • @KenWhite I do not have Use Debug DCUs checked. In XE7 there is no Library Or Browsing Paths under Project so I added $(BDS)\LIB to the overall Delphi settings (Tools > Options) per your instructions " One additional thing to make sure of is that you don't have the $(BDS)\Lib\Debug value set in the Library or Browsing paths (Project->Options->Compiler in D2010); this will prevent the debug DCUs from being picked up when stepping through the code. (Set it to $(BDS)\Lib instead.)". Still no success. – TomT Oct 14 '17 at 00:17
  • And third-party component source? Are you reading that *entire* answer, or just picking and choosing pieces? – Ken White Oct 14 '17 at 00:20
  • @KenWhite I am not picking and choosing pieces. As far as I can tell, the source for all of my 3rd party components is on the browsing path (I assume that is what you were alluding to). I have not done the following, "You also may want to open the source for any third-party components you use (the packages), change them to not use debug information, and rebuild them as well." Is there any way to confirm whether/which 3rd party component might be to blame (if indeed that is the problem)? – TomT Oct 14 '17 at 16:03

1 Answers1

0
  1. Try add source files to the debugger source path in project options under debugger.

  2. Try disable runtime packages and add sources from runtime packages to project.

Zoe
  • 27,060
  • 21
  • 118
  • 148
oOo
  • 261
  • 2
  • 16