Please, could you add a "Use System debug DCU" with the "Uses debug DCU's" checkbox to avoid the debuger to go in the low level System functions ?

Please, could you add a "Use System debug DCU" with the "Uses debug DCU's" checkbox to avoid the debuger to go in the low level System functions ?

I've added a lib/no-debug folder with a copy of lib/release/system.dcu and changed the global debug DCU path to "$(BDSLIB)\$(Platform)\no-debug;$(BDSLIB)\$(Platform)\debug".

It could also be done by moving lib/debug/system.dcu to lib/system-debug/system.dcu...but I don't want to alter Delphi's default installation.

Comments

  1. Haha, yeah that's so annoying to always jump into all these low level functions when all you want to do is debug some higher level RTL or VCL/FMX.

    ReplyDelete
  2. added also SysInit.dcu and System.Variants.dcu :)

    ReplyDelete
  3. Nice workaround, and good idea. I also hate the lines of assembly for copying back a string... However, I fear that different developers will have a different idea of "System debug DCU". I'm sure this will need some thought and some fine tuning... System.dcu alone is not really enough.

    ReplyDelete
  4. That may be difficult to be done with just a switch. The "Use Debug DCU" switch just inserts another entry to the search path so the compiler can find the debug units first. If you want to select the units with debug info, moving them in separate folders is the only way to go. Given that different people may have different opinions on what units to debug, this might lead to some trouble.

    ReplyDelete
  5. a single checkbox is probably not the ultime solution, but I'm pretty sure that almost all developpers will agree to disable the "very low" system functions with just one click.

    Another option is to add a $IFDEF FULL_DEBUG option around assembler code. but that will duplicate all this units in a lib/full-debug folder.

    My preference is to remove just System, SysInit and Variants because they interact with all the cleaning code added everywhere by the compiler.

    ReplyDelete
  6. If we could just avoid tracing through assembler code, it would be a great start.

    ReplyDelete
  7. Can you add a link to your Quality Portal issue please

    ReplyDelete
  8. Yes, but you have to take care of each patch, I don't like to change things in the Program Files folder.

    ReplyDelete
  9. Paul TOTH Well then it's good that nowadays a patch for Delphi means a complete reinstall, right? :p

    ReplyDelete
  10. Paul TOTH The approach in the answer Jeroen Wiert Pluimers refers to does not require that

    ReplyDelete

Post a Comment