Copy link to clipboard
Copied
I’m writing a plug-in for InDesign, but I keep losing my JS code changes when I close the tool or ID crashes.
But in the editor, the code is marked as dirty when I make changes; and then that’s cleared when I “save” it. But if I look at the JS file on disk (using the dev tool’s “Open folder” command), it doesn’t reflect my changes.
There’s no “show in Explorer” option in the context menu in the left pane of the UXP tool, and “Copy link address” doesn’t work; it just copies the filename, not the path. And the “Filesystem” tab is useless: It contains nothing, and the “add folder to workspace” button does nothing.
So… are people just using some other tool and still littering their code with alerts to debug?
Copy link to clipboard
Copied
Hi Thomas,
There are two tabs at the top – Developer Workspace and Playground. I've never used the Playground tab, but I use the Developer Workspace tab all the time – to load, watch, and debug the plugins I am developing. I'm creating UXP plugins for InDesign. In my experience the UXP Developer Tools program works fine. I'm wondering how you have things set up and what your expectations of the program are.
Philip
Copy link to clipboard
Copied
Hi Philip,
Thanks for the reply. I'm using Developer Workspace also.
My expectations are to do exactly what you're doing. But the editor is not saving the code, despite claiming to.
If I edit something and press Save, I expect it to do so.
Copy link to clipboard
Copied
Hi Thomas,
What 'editor' are you talking about? The UXP Developer Tools doesn't have an editor.
Philip
Copy link to clipboard
Copied
That's odd. My installation does:
Copy link to clipboard
Copied
Hi Thomas,
Ah, OK. That's the debugger. To be honest, I didn't know you could edit files there, and it's never occurred to me to even try, so I've no idea whether it's possible or not. I only use that for watching the console log (which I do a lot), and for inspecting the elements of my html (which I do occasionally). I do the actual creation and editing of the files completely outside UXP Developer Tools. Someone else might correct me, but I really don't think that debugger is intended to be used as the actual editor.
I work on a Mac, and I particularly like the code editor called Nova made by a company called Panic, so that's what I personally use as my editor, but you can use whatever editor you like. My files for any given plugin sit in a folder on my hard disk. I open and edit them in Nova.
In UXP Developer Tools I will click "Add Plugin" (top right of the Developer Workspace tab), which pops open the standard file picker, navigate to the folder containing the files of my plugin, select the manifest file, click "OK" (or whatever it is). That is done once to get the plugin into the list. When I am actually working, I will launch InDesign. In UXP Developer Tools I will select the plugin I am working on in the list and click "Load & Watch" (to load it into InDesign) and then click "Debug" to bring up the Debugger.
Then I start editing my code (in Nova). inDesign is runnning, my plugin is loaded, the debugger console is visible. When I make a change to my code and save a file (still in Nova), the UXP Developer Tools reloads the plugin (that's what the "Watch" means in "Load and Watch"), and if I've made a stupid mistake in my code, an error message will pop up in the console telling me the file and line number where the error is. I go fix the error, save the file again, it reloads (now without the error). Rinse and repeat.
So, files sit in a folder. They are edited in an editor of your choice. The UXP Developer Tools is in the mix to load your plugin (on-the-fly as it were) into inDesign and provide you with a console log. That's it.
Philip
Copy link to clipboard
Copied
Thanks for all that, Philip. Yes, it is apparently supposed to be an editor, because it will mark the file as "dirty" by putting an asterisk in the tab when you make changes and get rid of it when you "save."
Now just today on my system its behavior has changed slightly, in that it's showing a warning triangle in the tab, with a ToolTip saying it couldn't save to the filesystem. This wasn't happening before (I have a screen recording) despite the lack of saving, so clearly there are some UI problems. Even when it does show the tiny triangle, it says nothing if you close the window; no prompt to "save as" or otherwise preserve your work.
So now I'm working in VS Code and relying on alerts (since console logging goes nowhere, another PITA). By writing directly into
C:\Program Files\Adobe\Adobe InDesign 2025\Scripts\Scripts Panel
at least I can efficiently run the script in InDesign.
Copy link to clipboard
Copied
Hi Thomas,
I'm confused again. Is it a UXP script you are working on or a UXP Plugin (a panel in InDesign etc.)?
Philip
Copy link to clipboard
Copied
It was originally just a script, but the "developer tools" don't envision this and there's no apparent way to debug a stand-alone script.
The code will run in either environment. Once I have it refined enough, I might distribute it to my team as a plug-in. At this point I created a new plug-in using the dev tool, copied my script into main.js, and opened the generated folder in VS Code. So I can debug and will not rely on the dysfunctional "editor."
It's really irritating that there's no way to run the code in the debugger. You can pause and stop, but not run. WTH?
Copy link to clipboard
Copied
So what is it that you want from console.log that it doesn't give you? As I mentioned, for me the console.log in UXP Developer Tools constantly throws up error messges as I write code and make mistakes – missplaced brackes, undefined variables, all the things that you do when you type too fast! 😉 And the error messages tell me where I've made the mistake. I'll sometimes delberately write to the console if, for instance, I want to check what the value of something is. So I can't really think what else I'd want console.log to do?
Copy link to clipboard
Copied
That's in the Developer Tools. Console logging goes nowhere in a stand-alone script.
I've just verified that "watch" doesn't work either. I make changes to the code in VS Code, and it's not reflected in Developer Tools. Attempting to reload it there manually usually locks up InDesign, so ID has to be force-quit. Good times.
Copy link to clipboard
Copied
@Thomas_Calvin in case Philip didn't make it explicit: do not edit code in the debugger. It won't save. Edit code in your IDE text editor... eg. VSCode.
My opinion: I'm not doing much with UXP until it has proper support, such as integration with VSCode. Might be okay for plug in development (is it though?) but far too annoying for stand along scripting.
- Mark
Copy link to clipboard
Copied
Oh yeah, it's clear at this point that the "editor" in "Developer Tools" is BS.
And agreed: The whole thing is pretty half-assed. I really wanted to use it for the debugger, because of the aforementioned lack of console output from stand-alone scripts. And it looked like it might be OK, but ID locks up more than half the time after you want to stop and reload anyway.
And what's with the lack of a "Run" or "Go" button? The environment is just so clumsy and irritating to use.
Copy link to clipboard
Copied
Are you aware of today's Developers Live event?
Beyond that, UDT also has a dedicated category in the separate Creative Cloud Developer forum, which also has an InDesign specific category (mostly covering InDesign UXP).
Copy link to clipboard
Copied
Huh, nope! Would've been potentially nice to know about... although the schedule seems to be heavy with "AI"-related junk.
I did find that developer forum, thanks, and had posted a question there days ago. That forum is dead. The posts are mostly ancient, and I got zero replies. Just another waste of time that ought to be taken down and consolidated with this one.
Copy link to clipboard
Copied
Don't underestimate the CCDev forum - UDT is not really specific to InDesign, neither are many other UXP issues. Some issues get more attention, some fewer, or require more noise. Also the team handling that area has quite much on their plate and just had their big yearly event …
Speaking of that event, there are also the monthly Office Hours, you should find them thru the same link.
Copy link to clipboard
Copied
Thanks for the info!
Copy link to clipboard
Copied
Hi,
I have posted a reply to your message in the Creative Cloud Developers Forum . . . assuming that it is you using "OscarG" as a username there! 😉
Philip
Copy link to clipboard
Copied
Yeah I wish Adobe would consolidate all of its "accounts." Oh well!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now