Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Debug Dump Tool

Guide ,
Nov 21, 2011 Nov 21, 2011

I've attached the source for a Debug Dump tool.It appears as a red bug icon in the toolbar. When you click on art, it will spit out the contents of its art dictionary recursively. If the stroke or fill have an effect on them, it will dump the name of the effect & its parameters (since they're a dictionary). It will print out the handle of the art & its type, as well as its layer name & handle. If you hold down SHIFT, it will dump the layer's dictionary. If you hold down SHIFT + ALT/OPTION, it will print out the document's dictionary.

This was originally built into our product MAPublisher, but I've reduced the internal class code (there wasn't much as it turns out) to basic AI calls (so forgive any obvious redundancies) and I've converted to using non-Qt method for outputting to the Output Window. I'm sure this could be improved -- feel free to post any improvements you make!

I built it using the CS4 SDK because it had Visual Studio 2005 projects I could work from. It's based off the MultiArrowTool sample project in case you're wondering. You *should* be able to drop this into the samplecode folder of the CS4 SDK and (probably) the CS5 SDK and have it work. You'll probably want to tweak the linker output -- I'm assuming a typical CS4 install path.

Important note #1


Because this outputs to the Output Window you'll need to be debugging this on Windows in order to see the results. It wouldn't take much to modify the plugin to output this somewhere else -- just change TraceInternal(), a function in the middle of DebugDumpToolPlugin.cpp.

Important note #2

I haven't actually built this on the Mac, and I've only done my best to update the resources & such. The project is going to be pointing at MultiArrrow*.h/cpp. Hopefully you can just change that to the DebugDumpTool*h.cpp and have it work. If someone wants to post updated Mac Projects, I'll put together a new compilation.

If I've forgotten something, let me know. Also, post any questions you have about how this thing works. Hope this helps!

TOPICS
SDK
2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Nov 22, 2011 Nov 22, 2011

Works like a charm Andrew, awesome stuff!

I've built a version for the Mac (XCode 3.2.6) using the CS5 SDK with 10.5 Base SDK and it works brilliantly.  I've changed some of the include paths to look in ./../illustratorsdk instead of ./../../illustratorsdk but that's about it.

I don't see an 'attatch file' option on here or I'd upload the updated project.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 22, 2011 Nov 22, 2011

Wow! I can't wait to try this, it sounds indispensable. Too bad I'm still stuck on CS3.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 22, 2011 Nov 22, 2011

You should be able to lift the code for CS3 with a little work. All my work is in DebugDumpToolPlugin.cpp. I can't remember what a CS3 sample looks like, but you just need to find a tool sample and drop the stuff about 'On mouse down' from mine to there, and then copy the associated helper methods. I don't htink anything in the plugin is CS4-specific. I just used that because it was handy.

And no, there doesn't seem to be an attach file -- that's why I had to host it on our website. It does make exchanging this kind of stuff a little annoying.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 19, 2016 Mar 19, 2016
LATEST

Andrew, this sounds like an awesome tool. I'm working on CS6 plugins on Mac OS (El Capitan with Xcode 7) and am really in the dark without the debug panel to show me the structure of the objects I'm working with. I downloaded your project, replaced the source files, and am a bit stumped by the number of errors from references to ADM suites. It'd be a lot easier if I knew how much of the possibly-offending MultiArrow remnants could be stripped out and whether the tools and icons could be replaced with a simple menu from code. Have you by chance updated this project since your last posting? It's unfortunate that all major compilers don't have the level of disclosing variables and environment as clearly as the Script Debugger app for AppleScript. -- Rick

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 24, 2011 Nov 24, 2011

Hi Andrew,

Thank you for your decision to share this great tool with us. I hope that some day I will be able to help others the way you are helping us.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 04, 2012 Jan 04, 2012

Nice job you have done.

Actually, I have maked it work on Windows.

I still have to check it on Mac OS X.

Anyway, thanks for the contribution.

Thomas.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines