Copy link to clipboard
Copied
In the attached code, the writeln called from the Window I have created is not displaying in the debug console. The other two do work. This has come up during the upgrade to Visual Studio code and AE V22 and was working previously in the extendscript sdk. This is obviously a simplified code version. I have an extensive toolkit in AE and would like to see the console results. Any thoughts, am I missing the obvious?
$.writeln("This Works");
function myScript(thisObj) {
function myScript_buildUI(thisObj) {
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Test writeln", undefined, { resizeable: true });
var res = "group{orientation:'row',\
myTabbedPanel: Panel{type:'tabbedpanel', text:'',\
myTab1: Panel{type:'tab', text:'Test',\
myTabContent1: Button{text:'Writeln will not work'}\
},\
},\
}";
myPanel.grp = myPanel.add(res);
myPanel.grp.myTabbedPanel.myTab1.myTabContent1.onClick = function () {
$.writeln("This No Workie");
alert(this.text + " button clicked");
}
return myPanel;
}
var myScriptPal = myScript_buildUI(thisObj);
if (myScriptPal != null && myScriptPal instanceof Window) {
myScriptPal.center();
myScriptPal.show();
}
}
myScript(this);
$.writeln("This Works");
Copy link to clipboard
Copied
to fail to answer my own question well. It seems like a problem is the new debugger. The debug session stops running after the code has finished so it no longer receives input from code run by the created Window.
For more detail, see this thread for anyone interested.
https://community.adobe.com/t5/exchange-discussions/extendscript-debugger-v1-x-needs-a-rethink/td-p/...
For me, very annoying as I love the new version and the speed improvements. But also love feedback in long, long processes.