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.
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.
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.
ReplyDeleteadded also SysInit.dcu and System.Variants.dcu :)
ReplyDeleteNice 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.
ReplyDeleteThat 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.
ReplyDeletea 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.
ReplyDeleteAnother 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.
If we could just avoid tracing through assembler code, it would be a great start.
ReplyDeleteCan you add a link to your Quality Portal issue please
ReplyDeletehttps://quality.embarcadero.com/browse/RSP-10347
ReplyDeletePaul TOTH I quickly hacked something together ;)
ReplyDeletehttps://bitbucket.org/sglienke/toolsapi
Stefan Glienke nice ;)
ReplyDeleteI remember asking this earlier and David came up with a smart solution: http://stackoverflow.com/questions/20873014/is-there-a-way-to-enable-debug-dcus-without-including-the-system-unit
ReplyDeleteYes, but you have to take care of each patch, I don't like to change things in the Program Files folder.
ReplyDeletePaul TOTH Well then it's good that nowadays a patch for Delphi means a complete reinstall, right? :p
ReplyDeletePaul TOTH The approach in the answer Jeroen Wiert Pluimers refers to does not require that
ReplyDelete