Copy link to clipboard
Copied
Hi!
I have recently moved from ESTK to visual studio code. I was making some changes to a existing script and when I executed it I got an error. If the option "Enable Javascript Debugger" is enabled, the try catch statements doesn't work, I have to disable it to be able to use the script.
Does someone know why is this happening? A bug somewhere?
Cheers!
Copy link to clipboard
Copied
It probably boils down to some configuration stuff you have to set in Studio. try()catch{} constructs are alwayy handled by the underlying interpreter/ compiler/ byte engine an d only triggered if there is a genuine state error. If nothing is triggered, then it could mean the engine intercepts it beforehand or auto-corrects/ refactors your code in some way. I'm pretty sure it's explained in the Studio docs. A quick web search seems to indicate that you actually need to set the supported language levels in the external JSON configs along with some other options, so the alert level and in turn the response to such internal stuff may simply depend on that. Also of course keep in mind that all Adobe scripts represent a specific sub-type of ECMA/ JS Script and some constructs may never work as expected in a generic editor simply because they are not known and not specifically referenced in the libraries and dictionaries used for debugging.
Mylenium
Copy link to clipboard
Copied
Thanks for your replay Mylenium!
I have done all the setup yes, and the debugger etc works fine, it's just that those try and catch statements.
Cheers!