How to enable the Javascript debugger in Adobe Reader

Using the debugger with Adobe Reader

 The JavaScript Debugger is normally accessed from the Acrobat Pro user interface, but it can also be triggered to appear in Adobe Reader when an exception occurs.  Though fully supported JavaScript debugging is only available in Acrobat Pro, the following instructions make the complete Debugger functionality available in Adobe Reader on Windows and Mac OS platforms.

For Windows, note that this procedure involves editing the registry. Adobe Systems Incorporated does not provide support for editing the registry, which contains critical system and application information. It is recommended that you back up the registry before modifying it.

  1. Get a copy of the file debugger.js from an installation of Acrobat (plugins folder), the Acrobat Developer Center, or from the SDK (Acrobat 9.0 SDK/JavaScriptSupport/Debugger/debugger.js)
  2. Copy the debugger.js into the Reader 9.0/Reader/JavaScripts folder.
  3. Create key/value pairs in the registry settings, starting at the location HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\JSPrefs\ on Windows as shown in the table below, or in the property list file :Library:Preferences:com.adobe.Reader9.0.plist on Mac OS.

For Mac OS, use an appropriate editor for the property list file, and add the following children under JSPrefs, using Type “Array” in each case: ConsoleOpen, ConsoleInput, EnableDebugger, and Exceptions. Under each of these children, add the following children: 0 (number) and 1 (boolean).

bConsoleInput REG_DWORD 0×00000001
bEnableDebugger REG_DWORD 0×00000001
iExceptions REG_DWORD 0×00000002
(This will break into the Debugger when exceptions occur.)

4. Close and restart Adobe Reader. At this point the Javascript Debugger will be available.

Note: Since Adobe Reader does not provide access to the Debugger through its menu items or the Ctrl + J key sequence, the only ways to access the Debugger are to execute a JavaScript, cause an error, or customize the user interface (for example, you could add a button that runs a JavaScript causing the Debugger to appear).

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.5/10 (2 votes cast)
How to enable the Javascript debugger in Adobe Reader, 9.5 out of 10 based on 2 ratings

3 Responses to How to enable the Javascript debugger in Adobe Reader

  1. Lon Sokul says:

    Good site! I adore numerous of the articles which have been written, and particularly the comments posted! I will undoubtedly be visiting once again!

  2. Good site! I adore numerous of the articles which have been written, and particularly the comments posted! I will undoubtedly be visiting once again!

  3. A confused developer says:

    Really? Adobe makes all these products where developers have to work with reader and then makes really hard to do any debugging? Do you know how many employers block registry editing? Now I have to wait days for a network admin to grant me access and be asked 20 questions about why I need it. Thanks!