How Do I - Debug Scripts

Use this forum to ask questions about how to do things in QCAD version 3

Moderator: andrew

cmcgrath5035
Full Member
Posts: 51
Joined: Thu Oct 13, 2011 7:38 pm

How Do I - Debug Scripts

Postby cmcgrath5035 » Mon Apr 14, 2014 1:27 pm

I am continuing to refine my machine config scripts for CAM export, learning (hacking thru) JavaScript along the way.
Forum items and http://www.qcad.org/doc/qcad/latest/developer/index.html provide a lot of information and useful examples.

Is there a consolidate description of debugging resources available in QCADCAM in one place?

For example:
    How to use qDebug();
    Use of script debugger enabled with "./qcad -enable-script-debugger" and embedded "debugger;" directives

Thanks

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

Re: How Do I - Debug Scripts

Postby andrew » Tue Apr 15, 2014 5:26 pm

cmcgrath5035 wrote:Is there a consolidate description of debugging resources available in QCADCAM in one place?

For example:
    How to use qDebug();
    Use of script debugger enabled with "./qcad -enable-script-debugger" and embedded "debugger;" directives


No, in fact that pretty much sums it up. qDebug is just a print that prints to stderr, nothing fancy.
debugger; sets a break point, i.e. the script debugger will pop up if that statement is hit and script debugging is enabled (-enable-script-debugger).

cmcgrath5035
Full Member
Posts: 51
Joined: Thu Oct 13, 2011 7:38 pm

Re: How Do I - Debug Scripts

Postby cmcgrath5035 » Tue Apr 15, 2014 8:20 pm

debugger; sets a break point, i.e. the script debugger will pop up if that statement is hit and script debugging is enabled (-enable-script-debugger).


Well, I wasn't sure exactly what ...the script debugger... meant, so when in doubt, try something!
Ah so, it is the QT Script debugger that pops up!
My first encounter, looks very capable but acted sort of weird (wanted to hide behind the stalled QCADCAM window).
I have to investigate more on how the QT Script debugger is supposed to work.

Thanks


Return to “QCAD 3 'How Do I' Questions”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests