Debugger for IDML

From IDMLWiki

Jump to: navigation, search

When we do developing software, if there isn’t a debugger we must be arduous. It’s time when a IDML package has errors, nevertheless InDesign CS4 opens the package. It is silent. Unexpected data and scripting errors are ignored. Otherwise correct IDML packages aren’t treated in continuity. The progress is stopped. So, I appreciate that errors are ignored. But this behavior makes it difficult to debug IDML files. If there isn’t the error information, to find where wrong deta is in is difficult. I think that it’s better to install a debugger for IDML before starting to generate xml files.

Let’s look a COOKBOOK PDF. There is a description at 14th page. The debugger for IDML is provided to us as plugins. We need to compile the source files but without coding. I’m a mac user, therefore I will introduce only the way forward to making plugins with Xcode.

The project files are in <SDK>/build/mac/prj/. The file names of them are INXErrorLogging.sdk.xcodeproj and INXErrorLoggingUI.sdk.xcodeproj.

After one of them will be opened, at first select Release mode from popup menu at the top-left on window.

image:IDML_debug_1.png

Then click a build button. The plugin will be made on <sdk>/build/mac/release/SDK/. To show the completed plugin on Finder is easy. Look at the following picture.

image:IDML_debug_2.png

Select the name of Products folder on left of window, in this case INXErrorLogging.sdk.InDesignPlugin, and select “Reveal in Finder” using context menu. After then move it to Plug-Ins folder of Indesign CS4; /Applications/Adobe InDesign CS4/Plug-Ins/UI/. Of course, don’t forget INXErrorLoggingUI.sdk.xcodeproj, too.

At the last, we need to tell InDesign CS4 a reference of log file. Make an empty text file and display a dialog to select the file from menu bar as below.

image:IDML_debug_3.png

So, let’s mistake for effect (^.^) and try to out put error log! I used the most simple IDML package. I edited Spread_spread1.xml. I deleted one character of attribute name, then compressed the folder and opened the IDML package.

<PathPointArray>
 <PathPoint Anchor="36 36" LeftDirection="36 36" RightDirection="36 36"/>
 <PathPoint Anchor="36 186" LeftDirection="36 186" RightDirection="36 186"/>
 <PathPoint Ancho="172 186" LeftDirection="172 186" RightDirection="172 186"/>
 <PathPoint Anchor="172 36" LeftDirection="172 36" RightDirection="172 36"/>
</PathPointArray>

This was the result.

Begin a new INX Import Error Log

Scripting Property Error: set property 'path geometry' on object 'text frame' failed with error 0x770d 'セットのプロパティ 'PathGeometry' の値が無効です。予想される値は Array of GeometryPathType ですが、値 (((((36.0, 36.0), (36.0, 36.0), (36.0, 36.0)), ((36.0, 186.0), (36.0, 186.0), (36.0, 186.0)), (nothing, (172.0, 186.0), (172.0, 186.0)), ((172.0, 36.0), (172.0, 36.0), (172.0, 36.0))), FALSE)) を受け取りました。'
End of a session

author

PsychoCat 07:57, 9 March 2009 (UTC)




Personal tools