[PyQt] PyQt5 Activating QML/JavaScript Debugger (qmljsdebugger)

David Feinberg david at rawberg.com
Fri Oct 25 17:23:45 BST 2013


According to the Qt Creator docs (CONFIG+=qml_debug) enables debugging for Qt Quick 2 applications (Qt5) while (CONFIG+=declarative_debug) is for Qt Quick 1 apps.  Is it possible to set the qml_debug flag somehow in a PyQT5 app?
http://doc-snapshot.qt-project.org/qtcreator-2.8/creator-debugging-qml.html

To debug already running applications:
Build the application by using the appropriate configuration parameters (if you build the application with Qt Creator, it automatically uses the correct configuration):
Qt Quick 1: CONFIG+=declarative_debug
Qt Quick 2: CONFIG+=qml_debug
Start the application with the following arguments:
qmljsdebugger=port:<port>[,host:<ip address>][,block]
Where port (mandatory) specifies the debugging port, ip address (optional) specifies the IP address of the host where the application is running, and block (optional) prevents the application from running until the debug client connects to the server. This enables debugging from the start.
Select Debug > Start Debugging > Attach to QML Port.
Choose the kit configured for the device where the application to be debugged is running. The port number to use is displayed in the standard output when the application starts.

On Oct 25, 2013, at 9:15 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:

> On Mon, 21 Oct 2013 08:25:46 -0700, David Feinberg <david at rawberg.com>
> wrote:
>> I'm trying to get the qmljsdebugger functionality working for a PyQt
> 5.1.1
>> application on OSX. After taking all the steps outlined below I continue
> to
>> get this error "QML Debugger: Ignoring "-qmljsdebugger=port:3030".
>> Debugging has not been enabled." and I'm unable to connect from Qt
> Creator.
>> 
>> I've installed Qt 5.1.1 with all the options included via the OSX
>> installer (on OSX 10.8.5) and also via Homebrew with the --developer
> flag.
>> Both installs are in two separate locations.
>> 
>> I made sure sip was configured with the --debug flag before building
>> PyQt5. I've tried building the latest source snapshot of PyQt 5.1.1 via:
>> 
>> python3 configure.py --debug
>> 
>> When I try to run my app from the command line I get the following
> error:
>> 
>> python3 app.py -qmljsdebugger=port:3030
>> "QML Debugger: Ignoring "-qmljsdebugger=port:3030". Debugging has not
> been
>> enabled."
>> 
>> Additional steps taken: 
>> - Also tried everything with Python 2.7.5. 
>> - Verified my Qt5 install contains debug files and qmljsdebugger works
>> correctly for a C++ QML/JS app.
>> 
>> cross posting this here and on stack overflow 
>> 
> http://stackoverflow.com/questions/19470884/pyqt5-activating-qml-javascript-debugger-qmljsdebugger
> 
> I'm not sure but isn't this part of the deprecated (and so unsupported by
> PyQt5) QtDeclarative module?
> 
> Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20131025/9472614f/attachment.html>


More information about the PyQt mailing list