Hi,
As said,
GE typically opens a warning dialog.
The reason is obvious, read the warning carefully.
The list of dangers arising from incorrect use of the Shell is not exhaustive, it only includes a few examples.
The dialog lets you open the ECMAScript Shell or decline.
You can also opt to not show this warning dialog again.
Then GE would show the ECMAScript Shell widget directly without warning you about the dangers.
It is not really a terminal as you expect it to be.
The top section is a instruction history with replies, the bottom line is for entering instructions.
One can copy/paste several lines of code at once in the bottom line.
These are evaluated line by line, or better: block by block.
It may not act exactly the same as running a script with
XC, see related
topic 11844.
Scripts are written with a plain text editor, on windows I can advise Notepad++ (language JavaScript).
Saved as plain text with the file extension *.js and executed with
XC.
It is also possible to show '
a kind of terminal' for debugging but you can't edit code in that.
Not functional for running code with
GE or
XC, intended for debugging addon scripts for example.
Include the switch
-enable-script-debugger in your QCAD startup target.
In your script include
debugger; to halt the execution where you want.
Running QCAD in debug mode might not be a stable environment.
The debugger is said to be deprecated under Qt6 ... In snapshots ...
Apart from the vast list of open source example scripts (QCAD CE) on
Github ...
... You might also be interested in the
Simple API or the full
QCAD API.
Regards,
CVH