5

I am trying to debug a dense piece of code with multiple function calls in single lines. I want to single step through all the code that I have written, but in doing that I keep finding myself in the supplied source code, including the assembler code.

This is happening at a client's site on his machine running XE5. It doesn't happen on my own code, running XE2 and XE4.

What is the magic setting that makes this work they way I want?

Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
MarkAurelius
  • 1,203
  • 1
  • 14
  • 27

2 Answers2

9

The best you can do is make sure that Debug DCUs is disabled in the project options. But even doing that sometimes is not sufficient to stop yourself landing in RTL code, in modern Delphi versions. I suspect that you have Debug DCUs disabled and are being caught out by this behaviour change.

The only thing you can do is get used to knowing when to use step out (F8) rather than step in (F7), and being able to escape from a function as quickly as possible. Usually that involves putting the cursor on the last line, running to cursor (F4), and stepping in again.

Supun Wijerathne
  • 11,964
  • 10
  • 61
  • 87
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • I took a while to find that option. In Xe5 you bring up Project Options, then select Delphi Compiler | Compiling. The find the Debugging group on the grid, and the "Use debug .dcus" option is a check list. – MarkAurelius Aug 10 '15 at 07:25
  • That seems to have helped. Thanks. – MarkAurelius Aug 10 '15 at 08:22
  • 2
    @MarkAurelius if the answer was useful you can upvote it, and if it solved your problem you should mark it as accepted. – Craig Aug 10 '15 at 09:42
  • @AdmiralNoiseyBottom Comments can be deleted. Hover your cursor just to the right of the comment time stamp and a cross appears. Click it to delete. – David Heffernan Oct 03 '16 at 12:11
0

You might also be interested in the Selective Debugging tool by Uwe Raabe which allows you a fine grained selection for which DCUs are used with or without debug information.

dummzeuch
  • 10,975
  • 4
  • 51
  • 158