My mistake. Photoshop JSX, not directly. If you run your script directly from ESTK (target Photoshop) then they will show. This is how I usually debug.
Create a BridgeTalk message and send it to ESTK. You can opt to actually Launch ESTK, probably not something for production code, or see if ESTK is already running and send if it is. Something like this:
// might need to escape and encode the inMessage as well to deal with double quotes and single quotes in inMessage
function MyWriteln(inMessage) {
// comment this out for production code
if ( ! BridgeTalk.isRunning( "estoolkit" ) )
BridgeTalk.launch( "estoolkit" );
if ( BridgeTalk.isRunning( "estoolkit" ) ) {
if ( app.name == "ExtendScript Toolkit" ) {
$.writeln("help me " + inMessage);
} else {
var bt = new BridgeTalk;
bt.body = "$.writeln('help me : " + inMessage + "');";
bt.target = "estoolkit";
bt.send();
}
}
}