Page 1 of 1

How Do I - Debug Scripts

Posted: Mon Apr 14, 2014 1:27 pm
by cmcgrath5035
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/dev ... 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

Re: How Do I - Debug Scripts

Posted: Tue Apr 15, 2014 5:26 pm
by andrew
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).

Re: How Do I - Debug Scripts

Posted: Tue Apr 15, 2014 8:20 pm
by cmcgrath5035
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