How Do I - Debug Scripts

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

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
cmcgrath5035
Full Member
Posts: 58
Joined: Thu Oct 13, 2011 7:38 pm

How Do I - Debug Scripts

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

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

Re: How Do I - Debug Scripts

Post by 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: 58
Joined: Thu Oct 13, 2011 7:38 pm

Re: How Do I - Debug Scripts

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

Post Reply

Return to “QCAD 'How Do I' Questions”