executeMenuCommand and doScript problem in VS Code ExtendScript Debugger 2.0.3
Hello everyone.
I finally ran into a problem with which I decided to write here. A few days ago I decided to take a chance on debugging in VS Code. Everything was well but today I lost several hours in the process of writing a draft of one of the functions trying to figure out what was doing wrong. And then I decided to run the same code in ESTK and - surprise! - it worked as it should.
Win10, Illustrator 2023
The problem occurred when calling Pathfinder -> Substract (and Minus Back).
At first I did it via app.executeMenuCommand("Live Pathfinder Subtract"), but it just didn't work (or was wrong sometimes). I carefully checked everything and tried different options, nothing helped and I decided to use app.doScript. This worked if it was the only line in the script. But when it's inside a function, the illustrator just freezes at the moment the action is executed.
I have another calls of executeMenuCommand and doScript in my current developing script and it works as it should be.
I've tried restarting VS Code and Illustrator, googled a lot, restarted the computer couple times. Nothing helped until I remembered that there is an old, but familiar ESTK, open it and app.doScript worked without problems. Although app.executeMenuCommand("Live Pathfinder Subtract") still doesn't work. As a result, I reinstalled the ExtendScript Debugger extension by reducing the version to 1.1.2 and in VS Code it now also works.
So, the question is: the problem is in me and can it be fixed, or is it better not to upgrade to the latest version yet so that with every error I don’t think it’s me stupid or the debugger again decided to waste a couple of hours of life? Perhaps I need to somehow clear the test results that remain in memory ...
Thank you for your attention, I will be grateful for any comments.
