Livecycle Javascript - debugging

736 views
Skip to first unread message

Peter Gaston

unread,
Jan 30, 2014, 1:27:44 PM1/30/14
to live...@googlegroups.com
I've developed quite a few Livecycle 'smart form' apps leveraging Javascript - I do UI manipulation, things like tabs, hide/show, field validation, email, etc.    No xml i/o, or other.   Final forms work great!

However.   I've never been able to get the javascript debugger to work.    At best it pops up when there is a Javascript error and I see the error message.    It appears, by the debugger window that I should be able to actually use it as a debugger - breakpoints, inspect values, single step, etc.    (I have Livecycle and Adobe pro setup correctly as best as I can tell*.)     There has to be a better way than app.alert !!

A - Am I missing something on configuring/using the debugger?     

B - Is there more/better documentation on this?

Thanks!!!
p

*Here is what little I could find for ES2 - no mention of breakpoints, etc. - http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000808.html

Jono Moore

unread,
Jan 30, 2014, 2:33:45 PM1/30/14
to live...@googlegroups.com
Instead of using app.alert() use console.println() and then monitor the console window - much easier!

I've never played with the breakpoints or any of that stuff.

It would be nice if they'd integrate Designer and the ExtendScript Toolkit, would make for a much nicer scripting experience!


--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To post to this group, send email to live...@googlegroups.com.
Visit this group at http://groups.google.com/group/livecycle.
For more options, visit https://groups.google.com/groups/opt_out.

Darren

unread,
Feb 4, 2014, 12:05:59 AM2/4/14
to live...@googlegroups.com
Hi Peter,

Debugging in designer is great when it works. Unfortunately, this is rarely the case in my experience. I have had it work without fail for a year then I never see it again. I recently went through a long session with support to get it working and it involved me uninstalling everything, running the Acrobat cleaner from Adobe labs, scouring my user profile in windows for left over Adobe directories, uninstalling and re-installing everything (over and over and over again) until it finally worked. I was informed by support that it is NOT possible to debug Designer and why it is failing. It's all trial and error. :-/

Designer actually hooks into Internet Exploder ActiveX plugin to do the rendering within Designer. Check that all of your IE settings are reset to default and the add-in is properly enabled. Disable everything else that you can think of. Check your Acrobat debugging preferences (see link). FormBridge XFO also seems to kill the debugger and hang Designer under certain circumstances.

I documented some other things I found when I was doing this if it ever disappeared on me again. http://alivecycle.wordpress.com/2013/11/26/how-to-make-javascript-debugger-in-designer-work-again/

IMO debugging within Designer should be a self-contained process and not require Acrobat Pro. It used to be possible to debug using Reader by copying the debugger.js and making some registry tweaks but it seems that doesn't work any more.

Good luck!
Darren


Peter Gaston

unread,
Feb 7, 2014, 2:27:25 PM2/7/14
to live...@googlegroups.com
Thanks!    I'm with you that debugging should be all within the Livecycle app rather than the strange creation it currently is.    

This reminds me that Preview in Livecycle has never worked either.   Might as well ask that question as well!

Thanks again - p

Darren

unread,
Feb 8, 2014, 1:19:52 AM2/8/14
to live...@googlegroups.com
Hi peter, the preview tab in designer is almost always related to Internet Exploder and the ActiveX add-in. If you can't get the preview tab it is because either acrobat pro or reader haven't been enabled in IE

Try to use the acrobat cleaner from Adobe and reinstall both products checking IE as you go. Try to use just Pro as sometimes cause issues both being installed.

Cheers
Darren

tarekahf

unread,
Feb 8, 2014, 2:51:33 AM2/8/14
to live...@googlegroups.com
Hi Peter,

Try the following:

1. Close everything, and start Acrobat/Reader, press Ctrl-K and enable Javascript debugging

2. If you have both Reader/Acrobat, then there might be some issues.

3. If you have acrobat, then after preview is done, press Ctrl-J to open the console window.

4. You can start the debugger by placing the statement "DEBUGGER" (small or caps I don't remember) anywhere in the code. It will break the code, and open the console window which you can see the statement on some level, not all levels. I remember if your code in script object, you will not be able to see the code and debug it step by step

5. If you have Reader, then you have to execute the statement "console.show() to open the console window

6. Ensure Adobe Reader/Acrobat is installed properly and working properly with the browser

In general, debugging in Acrobat/Reader is not easy at all. The best way is to develop some functions to capture the errors and log them to some hidden field, and/or write debug statements to display the value of some variables.

Hope this helps.

Tarek
Reply all
Reply to author
Forward
0 new messages