11

I have a project that provides a JS API for (long running) user scripts. This project still uses the QtScript module which is kinda bugging me since the module is labeled deprecated for quite some time.

My problem is that i need the users to be able to debug their JS code, which is where QtScript and especially QScriptEngineDebugger is really handy.

Now i just read those 2 lines on the "What's New in Qt 5.7" help page.

Enabled all debug services to work with QJSEngine (instead of QQmlEngine), which allows non-QML JavaScript debugging or profiling.
Added support for debugging multiple QJSEngine instances at the same time.

Obviously that caught my eye, but searching through the rest of the help i couldn't find anything about debugging QJSEngine.

Can anyone tell me how to achieve something similar to QtScript and QScriptEngineDebugger with QJSEngine?

kluszon
  • 375
  • 5
  • 19
ldr
  • 211
  • 1
  • 11
  • I'd also like to know if and how I can finally migrate vom QtScript to QJSEngine. I'd be happy with users being able to suspend/resume, see the line where the script has paused, and (bonus) see the current line during script execution (the scripts are by definition slow enough for this, because they're for fieldbus communication). – OregonGhost Jan 06 '17 at 08:51
  • Did you find any way how to debug QJSEngine? Thanks – Ludek Vodicka Aug 11 '19 at 10:32
  • 1
    For reference, here's the suggestion on Qt's bugtracker: https://bugreports.qt.io/browse/QTBUG-55905 – jobor Jun 22 '22 at 10:15

1 Answers1

0

There is now a 3rd party fork of the QtScriptTools which can debug the new QJSEngine as well: https://github.com/DavidXanatos/NeoScriptTools

DavidXanatos
  • 119
  • 1
  • 9