run a modified script

Discussion forum for contributors and developers who are using the QCAD version 3 ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

run a modified script

Postby Surendranath » Thu Jan 10, 2013 10:56 am

How do I run a script after modifying it?
Should I restart qcad or is there some reload option from the command line?
I am a beginner and I need to modify the code if does not give the right result.
Restarting qcad each time seems heavy.
Surendranath
Junior Member
 
Posts: 16
Joined: Mon Jan 07, 2013 9:43 am

Re: run a modified script

Postby andrew » Thu Jan 10, 2013 11:05 am

Try these command line switches for development:

Code: Select all
-always-load-scripts             Forces reloading of scripts when they are used.
                                 This is mainly useful during script development,
                                 to apply changes without restarting QCAD.

-enable-script-debugger          Enables the script debugger.

-rescan                          Rescan scripts folder for new plugins


See also ./qcad -h

Note that -enable-script-debugger can also lead to crashes or unpredictable behavior, but it can be helpful for debugging. The debugger comes up if there's an error or if it meet a debugger statement:
Code: Select all
debugger;
User avatar
andrew
Site Admin
 
Posts: 2755
Joined: Fri Mar 30, 2007 6:07 am

Re: run a modified script

Postby Surendranath » Thu Jan 10, 2013 2:33 pm

I tried the command line options and they did not work for me.
This is my scenario. I have the script file open in a text editor.
I run this script from QCAD. it works.
I modify a line in the script file and call it again. It is the old file that is being executed.
Surendranath
Junior Member
 
Posts: 16
Joined: Mon Jan 07, 2013 9:43 am

Re: run a modified script

Postby andrew » Thu Jan 10, 2013 2:57 pm

User avatar
andrew
Site Admin
 
Posts: 2755
Joined: Fri Mar 30, 2007 6:07 am


Return to QCAD 3 Developers and Contributors

Who is online

Users browsing this forum: No registered users and 0 guests

cron