February 24, 2016
I've just uploaded on GitHub my runtime Object Inspector, or ObjectDebugger, for VCL applications.
I've just uploaded on GitHub my runtime Object Inspector, or ObjectDebugger, for VCL applications.
This is a component I wrote a lot of time ago for a Delphi 3 book (but never published as open source before) that you drop on a form and lets you inspect forms and components properties at runtime, and edit quite a few of them (including string lists and some other complex properties). It offers also access to some private data. As you can see from the source, it is based on the old TypInfo unit, not the newer RTTI code.
The code is at https://github.com/marcocantu/ObjectDebugger
Feedback and contributions ar more than welcome. Below is a simple screen shot:
PS. Thanks to Alain for asking about the component, which prompted me to make the code available.
posted by
marcocantu @ 9:26AM | 18 Comments
[0 Pending]
18 Comments
ObjectDebugger for Delphi 10 Seattle
Just added a reference to ObjectDebugger
in https://github.com/pierrejean-coudert/delphi-libraries-list
Comment by PJ Coudert on February 24, 10:44
ObjectDebugger for Delphi 10 Seattle
Is it possible to also dump content of properties
etc. to file or print out?
Comment by Alf Christophersen on February 24, 15:37
ObjectDebugger for Delphi 10 Seattle
To dump properties it should be enough to look at den file. Maybe
you mean components created at runtime?
Comment by Roland Bengtsson on February 25, 05:42
ObjectDebugger for Delphi 10 Seattle
For "dumping" content as easy option is to safe the current form as a
DFM file. This is one call. Not sure which other format would make
sense. Printing the grid content wont' really be trivial... even if this is
probably what you are looking for
Comment by Marco Cantu
[http://www.marcocantu.com]
on February 25, 08:53
ObjectDebugger for Delphi 10 Seattle
While I have not looked in depth at this in Depth
would this functionality be something that could be
used in the Delphi IDE debugger? The current
inspector functionality is pretty limited. You cannot
even search for a given item...
Comment by Larry Hengen
[http://www.tpersistent.com]
on February 25, 18:34
ObjectDebugger for Delphi 10 Seattle
Do you accept improvements and bugfixes?
Comment by Pascal on February 26, 18:48
ObjectDebugger for Delphi 10 Seattle
Pascal,
improvements are welcome. You can make a pull request on
GitHub... or just email me your suggestions.
Comment by Marco Cantu
[http://www.marcocantu.com]
on February 27, 12:25
ObjectDebugger for Delphi 10 Seattle
Thanks Marco, this is a very useful tool!
Comment by Peter on March 2, 01:48
ObjectDebugger for Delphi 10 Seattle
You could add:
• A method "Show" to bring up the Object Inspector programmatically
when it is needed.
• A property "Active", so we could leave the component on a form for
some time without getting in the way at program start.
• An application-wide "Shortcut" property to bring up the Object
Inspector with a keyboard shortcut when it is needed.
Comment by Peter Aschbacher on March 2, 09:22
ObjectDebugger for Delphi 10 Seattle
D7 annoys me in a few ways,. one of which is that it
does not save all files when you Ctrl+F9 to compile
all sources.
Does seattle do this properly, or at least have a
setting for it?
Comment by Thomas on March 2, 10:22
ObjectDebugger for Delphi 10 Seattle
Thanks for the suggestion. A friend is also making a FireMonkey
version.
Thomas, the is an IDE settings for saving on debug, not on compile.
But 10 Seattle has automatic saving of files for crash recovery
Comment by Marco Cantu
[http://www.marcocantu.com]
on March 2, 10:48
ObjectDebugger for Delphi 10 Seattle
Here is a more precise statement of my third suggestion:
An application-wide "Shortcut" property to bring up the Object
Inspector with a keyboard shortcut when it is needed.
Another option could fine-tune this: In this case, the currently focused
control will automatically be shown in the Object Inspector.
This would be very useful, as at run-time you could for example click
on a specific control to focus it and then press the Object Inspector
shortcut to bring up the Object Inspector showing the properties of this
specific control.
Comment by Peter Aschbacher on March 2, 12:42
ObjectDebugger for Delphi 10 Seattle
I did create a pull request with a few fixes and changes.
So check github from time to time ;-)
Comment by Pascal on March 3, 10:14
ObjectDebugger for Delphi 10 Seattle
Pascal, Still learning to use GitHub, but I don't see any pull request in
the project. You sure it is OK at your end?
Comment by Marco Cantu
[http://www.marcocantu.com]
on March 3, 11:00
FireMonkey version of ObjectDebugger for Delphi 10 Seattle
I've created a version of the Object Debugger that works with
FireMonkey.
It's available from:
https://github.com/dph2011/Object-Debugger-for-FireMonkey
Let me know what you think.
Comment by Daniel Horn on March 4, 00:03
ObjectDebugger for Delphi 10 Seattle
Yes im sure. Github tells me that im waiting for your
aproval to merge my forked patch1 into your master.
Comment by Pascal on March 4, 14:51
ObjectDebugger for Delphi 10 Seattle
Thanks for this Marco!
It is a really useful tool, I already used it to find my first bug.
Adam
Comment by Adam on March 4, 18:20
ObjectDebugger for Delphi 10 Seattle
Hello Marco,
thanks for sharing this tool!
Since I am new to Delphi, could you explain me how to
install an use this?
Thanks very much!
Comment by Christian on March 24, 11:18
Post Your Comment
Click
here for posting
your feedback to this blog.
There are currently 0 pending (unapproved) messages.