Where can I find the output of $.write() and $.writeln()?

The official documentation for the object $ states

This global ExtendScript object provides a number of debugging facilities and informational methods. The properties of the $ object allow you to get global information such as the most recent run-time error, and set flags that control debugging and localization behavior. The methods allow you to output text to the JavaScript Console during script execution, control execution and other ExtendScript behavior programmatically, and gather statistics on object use.

It’s great that we can write to the JavaScript (or ExtendScript) console, but where is the JavaScript console in Photoshop?

Note that I’m still developing scripts with ExtendScript. I know that in UXP we have an official debugger, which is cool, and I can print stuff to the console there. However, I still need to maintain an old ExtendScript script, so I’d like to see the ExtendScript console. If Photoshop is able to execute the script, then there must be some JavaScript interpreter/runtime and possibly console.

So where is it in modern Photoshops (version 26)?

If using the VS Code plugin (link), these are written to the Debug Console inside of VS Code. And, although I have no experience with old Adobe ExtendScript Toolkit (link), I’m pretty sure they would write to the included console there.

The extension doesn’t work in native builds of VS Code for M1 Macs and I suppose this also applies to other M Macs. It also has not been updated in 3 years. I’ll try it later anyway. I was expecting photoshop to come with some JS console. It must be able to interpret the JS somehow, but maybe this is builtin into the Photoshop code and is not separate and cannot be seen directly. Maybe the extension will reveal more about this.

Correct. If you install the extension and open the Apple Silicone version of VS Code, you’ll be greeted with a message telling you the extension will not work. You can the Intel version of VS Code (link) and run it independently on your Apple Silicone Mac. It is slow to load at startup and is not an ideal solution but does work if you need it.

I previously did some digging through the extension source code to try and determine if and where the console was. I couldn’t find concrete info on where or how to access the console or any port it may be broadcasting to and eventually gave up.

I did write a little helper utility script called Logger (link) that I often use when debugging. I just open the output log file and can watch the info stream in real-time.

Sorry, wish I had a better answer. Cheers!

$.writeln goes into the debug drawer inside the VS Code window