QML Debugger: Unable to listen to port



  • Hello together,

    I'm new to QML and have to work on a project started by a colleague.
    This forum has helped me a lot so far, but now I have a big problem and need your help
    There are a few bugs in the application and I want to debug it.
    When starting the application, I receive the following messages:

    QML debugging is enabled. Only use this in a safe environment.
    QML Debugger: Unable to listen to port 34567.
    

    Due to that is a ROS project I have to work wich cmake.

    System:
    Ubuntu 16.04
    Qt Creator 4.9.2
    QT 5.8.0
    ROS Kinetic

    Enable QML in the Debugger settings:
    0_1562834201101_Bildschirmfoto vom 2019-07-11 10-35-32.png

    CodeSnippets:

    CMakeLists.txt:

    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG ")
    
    set(TEMPLATE_QT_VERSION "5.8.0" CACHE STRING "Qt Version")
    set(TEMPLATE_QT_MODULES Core Gui Widgets Quick Qml Concurrent Network DBus PrintSupport)
    
    find_package(Qt5 ${TEMPLATE_QT_VERSION} EXACT CONFIG REQUIRED ${TEMPLATE_QT_MODULES})
    

    main.cpp:

      #include <QGuiApplication>
    
      #include <QQmlDebuggingEnabler>
    
      #include "ros/ros.h"
      #include "heartbeat/heartbeat.h" 
      #include <string.h>
      #include <iostream>
      #include "message_handler/ros2tag.h"
      #include <QQmlContext>
      #include <QtCore/QDir>
      #include <QtQuick/QQuickView>
      #include <QtQml/QQmlEngine>
      #include <QQmlApplicationEngine>
      #include "imageprovider.h"
    
      #include "qmlprox.h"
      #include <QtGui/QGuiApplication>
      #include <QtCore/QDir>
      #include <QQmlEngine>
    
      #include <QList>
      #include <QString>
    
      #include "geodataprovider.h"
      #include "georeferenceddatalistmodel.h"
      #include "georeferenceddatatriplelistmodel.h"
      #include "parameterdatalistmodel.h"
      #include "parameterdata.h"
      #include "beetImageHandler.h"
    
    
    
    
      int main(int argc, char **argv)
      {
          QGuiApplication app(argc, argv);
    
          QQmlDebuggingEnabler enabler;
    
          //Initialisierung Knoten
          ros::init(argc, argv, "hmi");
          ros::NodeHandle n;
    

    ROS-Launchfile:

    <launch>
      <arg name="externParameters" default="0" />
      <group ns="hmi">
        <node name="hmi" pkg="hmi" type="hmi" respawn="true" respawn_delay="10" args="-qmljsdebugger=port:34567" />
      </group>
    </launch>
    

    Due to the ROS launch-file the application is started with the argument "-qmljsdebugger=port:34567".

    What I've tried until now:

    • restart system
    • tried several ports
    • checked, that no other Qt Application is started

    Can anyone of you give me please an hint or a solution for my problem?

    Thank you in advance


Log in to reply