How to Debug JavaScript code in the QtCreator?

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
fang_h_y
Newbie Member
Posts: 8
Joined: Sat Jul 14, 2018 4:15 am

How to Debug JavaScript code in the QtCreator?

Post by fang_h_y » Sat Jul 14, 2018 10:04 am

Hello, Andrew.
We know the code is realized by JavaScript. When I debug the code I cannot debug the js file. Can you teach me how to debug JavaScript code with QtCreator?

Look forward to your reply.
fang_h_y

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

Re: How to Debug JavaScript code in the QtCreator?

Post by andrew » Mon Jul 16, 2018 1:18 pm

You can output states and variable values to stderr using qDebug("some string" + someVariable);

Use -enable-script-debugger to show the script debugger when an exception occurs of when the debugger; statement is used in your code.

fang_h_y
Newbie Member
Posts: 8
Joined: Sat Jul 14, 2018 4:15 am

Re: How to Debug JavaScript code in the QtCreator?

Post by fang_h_y » Thu Jul 19, 2018 1:00 am

Hello, andrew

Thank you very much!

fang_h_y

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”