New library developer - Debugging

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
sandyg
Junior Member
Posts: 20
Joined: Thu Dec 12, 2019 10:49 pm

New library developer - Debugging

Post by sandyg » Thu Dec 12, 2019 10:58 pm

I just started playing with creating a library plug in, based on the Gears one that I found.

What is a good way to log to the QCAD console in or other simple ways to output debugging information. I have hacked things up enough from the sample InvoluteSpur.js (Gears) file but have some simple bugs that I can't see to find.

I tried qDebug("xxx") as well as console.log() but I'm not sure those are right for a library script.

Any other tips for a newcomer with debugging help very much appreciated.

Sandy

CVH
Premier Member
Posts: 3417
Joined: Wed Sep 27, 2017 4:17 pm

Re: New library developer - Debugging

Post by CVH » Fri Dec 13, 2019 8:08 am

Hi,

Win or ....
Win = problematic.
I have a post on that, but can't find it.

look at:
https://qcad.org/rsforum/viewtopic.php?t=5687
https://qcad.org/rsforum/viewtopic.php?t=6215

Or search further with keywords from there.

Regards,
CVH

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

Re: New library developer - Debugging

Post by andrew » Fri Dec 13, 2019 8:28 am

qDebug("message") writes to the system console from where QCAD was started (i.e. the terminal, stderr).

To output to the QCAD command line history widget, you can use EAction.handleUserMessage("message");

sandyg
Junior Member
Posts: 20
Joined: Thu Dec 12, 2019 10:49 pm

Re: New library developer - Debugging

Post by sandyg » Sat Dec 14, 2019 2:40 am

Thanks all for the suggestions!

I am running on windows, so I'll take a look at the threads and see if that will help out.

I'm sure I'll be back for more questions and help ;)

Sandy

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”