Open Qt Script Debugger not only if an error occurred

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
fakeuser
Newbie Member
Posts: 5
Joined: Mon Nov 23, 2020 4:49 pm

Open Qt Script Debugger not only if an error occurred

Post by fakeuser » Mon Nov 23, 2020 4:54 pm

Hi Everybody,

is there a possibility to open the Qt Script Debugger not only if an error in a script occurred but before. I would need it to debug my scripts, even if there is no obvious error in the script. The debugger is also good for developement e.g. to see the order in which the event handlers are called a.s.o.

Thanks

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

Re: Open Qt Script Debugger not only if an error occurred

Post by CVH » Mon Nov 23, 2020 4:56 pm

Hi,

Include

Code: Select all

debugger;
Where you want it to halt

Regards,
CVH

fakeuser
Newbie Member
Posts: 5
Joined: Mon Nov 23, 2020 4:49 pm

Re: Open Qt Script Debugger not only if an error occurred

Post by fakeuser » Mon Nov 23, 2020 5:01 pm

Thanks. That's what i was looking for. I wanted to determine which script and at which point i want to debug the script in the Qt Script debugger.

fakeuser
Newbie Member
Posts: 5
Joined: Mon Nov 23, 2020 4:49 pm

Re: Open Qt Script Debugger not only if an error occurred

Post by fakeuser » Mon Nov 23, 2020 5:06 pm

Is there a way to print out strings / variable values to the console or the debugger output. something like System.out.println() in Java ?
qDebug does not work, print or alert doesn´t work too.

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

Re: Open Qt Script Debugger not only if an error occurred

Post by CVH » Mon Nov 23, 2020 5:34 pm

fakeuser,

Read the forum rules ...
1Q/Topic pls

Windows? No qDebug.
Did you try to search the forum for 'qDebug' ?
To the command line works.

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”