ExtendScript Debugger for Visual Studio Code (Mac Prerelease)
By: Kerri Shotts
Tags: Extendscript, Adobe Creative Cloud, Prerelease, Debugging, Scripting

An ExtendScript Debug Session in progress

If you’ve developed scripts or panels for any of Adobe’s flagship products, then you’re almost certainly familiar with the ExtendScript Toolkit (ESTK). You’re also probably aware that it is a 32-bit-only application and will stop working when Apple releases their next version of macOS (10.15). In December 2018 we announced what we were planning to do: build a Visual Studio Code plugin that would allow you to debug your ExtendScript even in a 64-bit environment.

Many of you were excited about the announcement and wanted to start testing the plugin right away. Well, we’re happy to announce that as of right now (Jan. 23, 2019), macOS users can join a special prerelease program that lets you do just that.

Note: For those of you on Windows, don’t fret! We’ll be delivering a version that works with Windows in a couple weeks.

Why Visual Studio Code?

Visual Studio Code is a free, open-source, and lightweight text editor created by Microsoft, and it’s quickly been embraced by the JavaScript community. In order to reach the most users, we wanted to build for an editor that was in high use and demand.

Once we release the plugin publicly, however, we hope that the community will be able to adapt the plugin to work in any number of other editors and IDEs. More information regarding the licensing and open-source model we’ll be following will be presented in the coming weeks.

What can you do with the plugin?

If you’re familiar with ESTK, you know that it was essentially a complete IDE: You could write new scripts, edit code, debug, and peruse each app’s scripting dictionary (or OMV, short for Object Model Viewer). However, this plugin is centered around debugging. As such, features that are orthogonal did not make it into this release. This includes things like the OMV, which, while nice to have, isn’t required for debugging purposes.

The debugging features are mostly what you’d expect. You can:

Launch the host application and select the target engine

Insert debugger statements to cause control to return to Visual Studio Code

statements to cause control to return to Visual Studio Code Add breakpoints

Step into and over statements

Run to cursor

View local and global variables in the current context

View the current call stack

Interact with the context via the debug console

Note: In order to debug any ExtendScript in your CEP panels, you’ll need to abstract the code into its own JSX file, and refactor it so that you can drive it from another script. You cannot directly debug ExtendScript that is invoked by CEP.

One important feature that isn’t related to debugging is the ability to create JSXBIN files. Because there is no other way to generate these files outside of ESTK, we brought that function in to the Visual Studio Code plugin.

When will the plugin be publicly released?

We’re currently targeting end of Q1 2019 for the macOS version of the plugin. This is still a tentative target, since issues discovered during the prerelease could move that out.

Joining the prerelease

Before joining, you should agree to the following:

Joining the prerelease program requires your agreement to the prerelease agreement. This is equivalent to an NDA (non-disclosure agreement). This is there to protect you, the user, as much as it is to protect Adobe.

If you join the prerelease program, please don’t share builds or other information outside of the prerelease forums.

The prerelease is intended to catch serious bugs before the public release. As such, you may encounter crashes and other issues. Please report those to the prerelease forum. We are testing internally, but we also depend upon your unique environments and use cases to fully test the plugin.

You’ll need a recent build of Visual Studio Code (1.30.2 or better). If you have an older build, the plugin will install, but it will fail to initialize.

Usage instructions are included within the prerelease forum.

Please let us know what you think about the plugin, including what it does right and what is missing or buggy. Feel free to submit feature requests as well! We want to make sure that the public release serves the needs of the community.

Ready to get started? Join the prerelease!