Important: Please read the Qt Code of Conduct -

QtScript (deprecated) vs QJSEngine and reasons why QJSEngine isn't up to scratch

  • I have been using QtScript for many years (along with many other qt modules). Porting from QtScript to QJSEngine is clearly not trivial especially when I have multiple QScriptEngine uses in many processes but thats specific to my use not general. One very nice feature in QtScript is the debugger. In fact the debugger can even be split out into a separate process e.g a remote debugger (using QScriptDebuggerFrontend/Backend and a developer built of QScriptTools) and I'm sure others use this feature too. The debugger isn't simply a nice feature as without a debugger the amount of time needed to develop and debug scripts becomes so great its probably a non-starter. So looking at QJSEngine the first major obstacle to porting is the utter lack of any debugger support. This means for me at least QJSEngine is still not up to the job. I use scripts in several different applications (suites of applications actually), for us, they are not used for UI interaction but for behind the scenes custom data processing and realtime control. Our applications expose hundreds of QObject based classes and other data types to script land. Use of signals and slots and exposing signals to javascript is commonplace. For one application that is installed on unattended computers in remote locations the ability to connect a remote script debugger is an absolutely essential feature. So to keep this post short and to the point I won't ramble on anymore but will simply state that the first and probably most important deficiency, as I see it, is simply the lack of debugger support in QJSEngine. I am certain that there are others. There have been some posts earlier relating to QJSEngine vs QtScript performance but I cannot comment as I have not tried to port anything other than a simple test application and I have not benchmarked it either. I strongly suspect that the lack of debugger will make adoption of QJSEngine far less likely for many existing QtScript users other than those who's use cases are very trivial. NB I also use WebKit and am looking at the QWebEngine replacement but thats a whole other story and is similar and also rather unpleasant. Of course deprecation has to happen sometimes but premature deprecation and removal of features tend to force people to stick with the earlier working version s. So the question I would like to ask is are there any plans to extend the QJSEngine framework to add debugger support or should I assume I'm going to be stuck forever?

  • Lifetime Qt Champion

    Welcome back.

    I would ask directly on
    as this is a user forum and the devs are not likely to see it here.

    Also i was not able to find any road map for QJSEngine besides
    so it would be best to just ask directly.

  • Thanks mrjj,

    I will post the question here as suggested. I always have great difficulty in locating relevant and up to date information relating to the further of QtScript & QJSEngine and similarly for webkit and webengine.

  • Lifetime Qt Champion

    well for webkit, there is this info
    (since it was asked a lot )

  • Important question. I asked here (Russian site).
    The answer is, "There are plans, but it's not very soon."

  • Lifetime Qt Champion

    Good read. ( thx to google translate)¨
    Seems like focus is mostly on QML tech so a new QJSEngine debugger seems somewhat distant.

Log in to reply