Copy link to clipboard
Copied
Dear all,
A crucial detail seems to be that the script to be run/debugged must be from the opened folder. Otherwise I get messages concerning missing/notfound targt although FM is open and the targt is addressed in the script by //@target framemaker
For scripts not needing the connection to FM the folder is not a requirement.
My setup of launch.json:
{ "version": "0.2.0",
"configurations": [
{ "type": "extendscript-debug",
"request": "launch",
"name": "Run current file",
"program": "${file}",
"stopOnEntry": false
}
]
}
Findings
"stopOnEntry": true​
would be helpful here.
Display of variables
{BTW I would appraciate a forum feature to highlight inline code appropriately - not just the code blocks}
Copy link to clipboard
Copied
Today is not a good day for VSC-ESD:
I have multiple locations in which I maintain and test scripts. Some of these locations (folders) don't create problems, others do. Currently I try to continue with my project FMfindRepl. Two days ago I did not have problems to run/debug this script:
I have tried various sequences of Open FM, Open VSC, Open the folder with the script, assure that in the folder of the script there is a sub-folder .vscode with a launch.json file in it...
Best solution might be: stop working, take a break or sleep and open Windows next day.
→ Again, there is no clear instruction how to get things running as expected.
I have just noticed a message at the very bottom which appears after I close the message "Can't start a session...":
This on(Double)Click.jsx is a script on which I was 'working' this morning. In the meantime Windows hibernated - and this is probaly not a good state for VSC-ESD...
Copy link to clipboard
Copied
Concerning the target engine:
Somewhere I found the note, that at the very bottom of the window there is a yellow field "Select Target Engine". When clicking there, It opens on top of the window a selection list:
After selection the chosen target application is indicated at the same place - but nearly unrecognisable:
→ obviously my light theme does not provide the best visual clues. In a dark theme this white and yellow stuff would have been visible. But IHMO it should be the task of theme builder to check this out...
BTW I hate the dark schemes - they remind me of the time of blackboards in school and the first writing experiences on slate boards.
Copy link to clipboard
Copied
post removed - should not be a nested post
Copy link to clipboard
Copied
Concerning the synstax check
I do not know whether the syntax highlighting and checking is influenced by the debugger - or whether this is due to the file extension jsx. This leads to strange visual clues:
There is nothing wrong here - the scripts creates the dialogue:
Concerning the handling of this test environment
OFF TOPIC - strange message when trying to post the above:
Copy link to clipboard
Copied
Hi Klaus,
The forum error message is probably shown because you posted this twice although you deleted the first one.
Best regards
Winfried
Copy link to clipboard
Copied
In the debuggers default mode (active), the debugger stays connected to that instance of FrameMaker.
This means whenever FrameMaker is restarted, you must then restart VSCode or it will still think it is connected to the old instance of FM.
This can be prevented by adding the following line to the launch config:
"extensionMode": "passive",
However, in passive mode, the debug can only be started by VSCode, not by FrameMaker.
If there is a primary version of framemaker you use, you can also add these two lines to the launch config:
"targetSpecifier": "framemaker-16.0",
"engineName": "main",
You can also create different launch configs for different FM versions and select them at the top of the debugger panel in VSCode.
The syntax highlighting is due to VSCodes built-in language server for javascript, so it will assume you are writing modern vanilla javascript.
There is not currently any language server specifically for ExtendScript, so it will have to do for now.
Always open a folder or workspace in VSCode. Only having a single file open will disable a lot of features.
If you have multiple discreet folders with your code in, you can create a new workspace, then use "File > Add folder to workspace" to add all the folders you need.
To change the colour of the text in the status bar you can add these two options to the launch config:
"selectTargetColor": "yellow",
"connectedTargetColor": "white",
Copy link to clipboard
Copied
DanReedVistair, thank you very much for these explanations and hints.