run a modified script

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
Surendranath
Junior Member
Posts: 16
Joined: Mon Jan 07, 2013 9:43 am

run a modified script

Post by 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.

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

Re: run a modified script

Post by 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;

Surendranath
Junior Member
Posts: 16
Joined: Mon Jan 07, 2013 9:43 am

Re: run a modified script

Post by 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.

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

Re: run a modified script

Post by andrew » Thu Jan 10, 2013 2:57 pm

Thanks. I've filed a bug report at:
http://www.ribbonsoft.com/bugtracker/in ... ask_id=745

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”