These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Debugging a Script object code

rigateika
Registered: Mar 7 2008
Posts: 14

I am trying to debug a form sample from Acrobat 7.0 and Designer 7.0 package.
This is Purchase Order form located in:
C:\Program Files\Adobe\Acrobat 7.0\Designer 7.0\EN\Samples\Purchase Order\Interactive\Forms\Purchase Order.pdf

The form has Javascript function [b]countryScript[/b]. The function is a Script Object located in folder form1/purchaseOrder/(Variables) and can be seen in Livecycle Designer.

The script [b]countryScript[/b] is called from dropdown drpOrderedByCountry on Initialize and Change events and dropdown drpOrderedByStateProv on Initialize event.

For the learning purpose I am trying to debug this code using Javascript Debugger in Acrobat 7.0.

So in the Debugger I can see the code for the events.
It is in XFA folder and the code calls the function:

[b][i]countryScript.getCountries(this). [/i] [/b]

But where is the function itself? I can't see the function code in the Debugger.

Anyway - I put a breakpoint there hoping that Step Into will take me into the function code. But this didn't happen.

So I am unable to debug the function.

How I could debug this function?
Thank you,
Tatyana

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Don't use the JavaScript Debugger, it's not that useful. Instead, use the console window for debug, and initial code development.

Read This:
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script