Skip to main content
Participating Frequently
August 20, 2020
Answered

ExtendScript Debugger - Import JSX Library files

  • August 20, 2020
  • 2 replies
  • 1338 views

Hi, 

 

I'm using the Extendscript debugger to run some one-off scripts in Premiere Pro. I don't want to create a panel for each one. 

 

I've got a few library .jsx files that I want to run before the main .jsx file (and also enter into the debugger). I've tried to import the jsx using an import statement, but the Debugger doesn't appear to do anythign with these statements.

```

//#import "util.jsx

```

In a panel, the .jsx files loaded are controlled by the javascript entry point, so I can just load the `util.jsx` file. Without a panel, how do I load an external .jsx file in Extendscript itself for use with the VSCode ExtendScript Debugger? 

This topic has been closed for replies.
Correct answer Tomas Sinkunas

It's a preprocessor directive. More info about it here: http://estk.aenhancers.com/extendscript-tools-features/preprocessor-directives.html?highlight=preprocessor

2 replies

Tomas Sinkunas
Tomas SinkunasCorrect answer
Legend
August 20, 2020
woodcedAuthor
Participating Frequently
August 20, 2020

Excellent Tomas. That works perfectly. For some reason I had the wrong pre-processor directive, but `//@include "json.jsx" works in the VSCode Extendscript debugger for non-panel files. 

 

 

Bruce Bullis
Community Manager
Community Manager
August 20, 2020
Try:

//@include filename.jsx