Add debug JavaScript

Before you begin

We're rolling out a new, more intuitive product experience. If the screen shown here doesn’t match your product interface, select help for your current experience.

In the new experience, the tools appear on the left side of the screen.

Acrobat JavaScript debugger

The JavaScript debugger in Acrobat lets you review your code line by line, set breakpoints, and inspect variables using the debugger dialog.

Enable JavaScript debugger

  1. Go to Acrobat Preferences from the hamburger menu  , or the Acrobat menu (macOS).

  2. Select JavaScript, and then select Enable JavaScript debugger after Acrobat is restarted.

Use JavaScript debugger

  • Select All tools > Use JavaScript > Debugger.

Manage JavaScript

You can use the Document javascript strings option to add, edit, or delete scripts in your current document. Choose All tools > Use JavaScript > Document javascript strings.

JavaScript Editor

You can use the JavaScript Editor to create and edit scripts. Go to All tools > Use JavaScript > All javascript strings.

Document actions and JavaScript

You can associate a particular JavaScript to a specific document action. When the action is triggered, the script executes.

Steps to open the Document actions dialog:

  1. Select All tools > Use JavaScript > Document actions.

  2. Select an action and then select Edit to add the script to the action.

Customize PDFs using JavaScript

One of the easiest and most powerful ways to customize PDF files is by using JavaScript. Based on JavaScript version 1.5 of ISO-16262 (formerly known as ECMAScript), JavaScript in Adobe Acrobat software implements objects, methods, and properties that enable you to manipulate PDF files, produce database-driven PDF files, modify the appearance of PDF files, and much more. You can tie Acrobat JavaScript code to a specific PDF document, a page, field, or button within that document, or a field or button within the PDF file, and even to a user action.

JavaScript is useful for XML forms. JavaScript enables automated forms handling, Web and database communication, commenting, and user-interface capabilities. PDF files created with Acrobat and Adobe LiveCycle tools allow data to be extracted as XML into custom schemas. Applications written in Java and other languages easily integrate Acrobat with web services using Simple Object Access Protocol (SOAP).

For more information, see Developing Acrobat applications using JavaScript.

Get help faster and easier

New user?