Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Debugger: Unable to listen to port
Forum Updated to NodeBB v4.3 + New Features

QML Debugger: Unable to listen to port

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
cmakedebugqml
1 Posts 1 Posters 924 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krehf
    wrote on 11 Jul 2019, 08:53 last edited by
    #1

    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

    1 Reply Last reply
    0

    1/1

    11 Jul 2019, 08:53

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved