You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out why the QML debugger won't successfully connect to an instrumented Linphone. I'm building Linphone from source via Qt Creator (Debug profile). From the source, I understand that the QML Debugger is enabled for debug or relwithdebinfo builds, from linphone-app/CMakeLists.txt:
I'm using Qt with qtdeclarative 5.15.10, and I've verified that qtdeclarative is built with QML debug support and installs the qmltooling plugins.
In Qt Creator, I've made sure that both the build settings have QML debugging and profiling set to Enable, while the Run Settings debbugger settings have the C++ debugger set to enabled and the QML debugger as well, and have rebuilt the project with these settings.
Now suppose I put a breakpoint around linphone-app/ui/views/App/Main/MainWindow.qml:250, on the line var model = CallsListModel.launchChat( sipAddress,0 )
The breakpoint appears as an Unclaimed Breakpoint. When launching the debug session, it hangs waiting for the debugger to connect to the application, but it never can -- the port isn't listening (wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError).
Here's what I see in the Qt Creator debugger's log:
wNote: This log contains possibly confidential information about your machine, environment variables, in-memory data of the processes you are debugging, and more. It is never transferred over the internet by Qt Creator, and only stored to disk if you manually use the respective option from the context menu, or through mechanisms that are not under the control of Qt Creator's Debugger plugin, for instance in swap files, or other plugins you might use.
wYou may be asked to share the contents of this log when reporting bugs related to debugger operation. In this case, make sure your submission does not contain data you do not want to or you are not allowed to share.
w
sQML Debugger: Status of "QmlDebugger" Version: -1 changed to 'not connected'.
wSome breakpoints cannot be handled by the debugger languages currently active, and will be ignored.<p>Affected are breakpoints 2, 3, 4, 5<p>QML debugging needs to be enabled both in the Build and the Run settings.
dStart parameters: 'Custom Executable' mode: 1
dABI: x86-linux-generic-elf-64bit
dLanguages: qml
dExecutable: /home/maxim/src/linphone-desktop-reference/build-5.2.4/OUTPUT/bin/linphone --verbose -qmljsdebugger=port:42957,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation
dDirectory: /home/maxim/src/linphone-desktop-reference/build-5.2.4/OUTPUT
dDebugger: /gnu/store/c3ms6sds5hr795gk3rh8spw28ry4m3vi-gdb-14.2/bin/gdb
dProject: /home/maxim/src/linphone-desktop-reference
dAdditional Search Directories:
dQML server: 127.0.0.1:42957
dSysroot:
dDebug Source Location: /usr/src/debug/qt5base/src/corelib:/usr/src/debug/qt5base/src/gui:/usr/src/debug/qt5base/src/network
dDebugger settings:
d/AdditionalArguments: (default: )
d/AlwaysAdjustColumnWidths: true (default: true)
d/AutoDerefPointers: true (default: true)
d/BreakEvent: (default: )
d/BreakOnCrtDbgReport: false (default: false)
d/BreakpointCorrection: true (default: true)
d/CDB_Console: false (default: false)
d/FirstChanceExceptionTaskEntry: true (default: true)
d/IgnoreFirstChanceAccessViolation: false (default: false)
d/LogTimeStamps: false (default: false)
d/SecondChanceExceptionTaskEntry: true (default: true)
d/SortStructMembers: true (default: true)
d/SourcePaths: (default: )
d/SymbolPaths: (default: )
d/UsePythonDumper: true (default: true)
d/UseToolTipsInBreakpointsView: false (default: false)
d/UseToolTipsInLocalsView: false (default: false)
d/UseToolTipsInStackView: true (default: true)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1)
dCALL: SETUP ENGINE
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineRunRequested(3)
dCALL: RUN ENGINE
<Starting /home/maxim/src/linphone-desktop-reference/build-5.2.4/OUTPUT/bin/linphone --verbose -qmljsdebugger=port:42957,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Trying to connect ...
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
QML debugging is enabled. Only use this in a safe environment.
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
Set TimeZone to "America/Montreal"
�[1;34m[02:48:03:890][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:343: "Starting application Linphone (bin: linphone). Version:5.2.5-pre.1+ab6c9aa5 Os:guix/unknown Qt:5.15.10"
�[1;34m[02:48:03:890][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:348: "Use locale: en_US with language: English"
�[1;34m[02:48:03:890][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:351: "System timezone: code=0 / country=Default / Offset=0 / ID=America/Montreal"
�[1;34m[02:48:03:921][Info]�[1;35mCore:linphone: �[0mQT: app/AppController.cpp:103: Available fonts : ("DejaVu Math TeX Gyre", "DejaVu Sans", "DejaVu Sans Condensed", "DejaVu Sans Mono", "DejaVu Serif", "DejaVu Serif Condensed", "Monospace", "Noto Sans", "Noto Sans UI", "Roboto Mono", "Roboto Mono Light", "Roboto Mono Medium", "Roboto Mono Thin", "Sans Serif", "Serif")
�[1;34m[02:48:03:921][Info]�[1;35mCore:linphone: �[0mQT: app/main.cpp:91: "Running app..."
�[1;34m[02:48:03:921][Info]�[1;33mCore:linphone: �[0mUsing (r/w) config information from /home/maxim/.config/linphone/linphonerc
�[1;34m[02:48:03:922][Info]�[1;33mCore:linphone: �[0mReading config information from /home/maxim/src/linphone-desktop-reference/build-5.2.4/OUTPUT/share/linphone/linphonerc-factory
�[1;34m[02:48:04:051][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:506: "Activated selectors:" ("custom", "en_US", "unix", "linux", "guix")
�[1;34m[02:48:04:052][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:743: "Registering types..."
�[1;34m[02:48:04:053][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:842: "Registering shared types..."
�[1;34m[02:48:04:054][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:864: "Registering tool types..."
�[1;34m[02:48:04:054][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:876: "Registering shared tool types..."
�[1;34m[02:48:04:267][Info]�[1;35mCore:linphone: �[0mQT: app/App.cpp:564: "Loading main view..."
�[1;34m[02:48:04:553][Info]�[1;35mCore:linphone: �[0mQT: components/core/CoreManager.cpp:261: "Launch async core creation."
�[1;34m[02:48:04:554][Info]�[1;33mCore:linphone: �[0mUsing (r/w) config information from /home/maxim/.config/linphone/linphonerc
�[1;34m[02:48:04:554][Info]�[1;33mCore:linphone: �[0mReading config information from /home/maxim/src/linphone-desktop-reference/build-5.2.4/OUTPUT/share/linphone/linphonerc-factory
�[1;34m[02:48:04:568][Info]�[1;33mCore:linphone: �[0mInitializing LinphoneCore 5.3.41
�[1;34m[02:48:04:568][Info]�[1;33mCore:linphone: �[0mSal nat helper [enabled]
[...]
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
[...]
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
�[1;34m[02:48:10:285][Info]�[1;33mCore:linphone: �[0mNo SRV results while A/AAAA fallback resulted arrived a while ago. Giving up SRV.
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
�[1;34m[02:48:12:845][Info]�[1;33mCore:linphone: �[0mChanging [client] [SUBSCRIBE] transaction [0x1bea6f0], from state [COMPLETED] to [TERMINATED]
�[1;34m[02:48:12:845][Info]�[1;33mCore:linphone: �[0mClient SUBSCRIBE transaction [0x1bea6f0] terminated
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
[repeated multiple times...]
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::HostLookupState
sQML Debugger: Socket state changed to QAbstractSocket::ConnectingState
sQML Debugger: Socket state changed to QAbstractSocket::UnconnectedState
wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
dNOTE: ENGINE RUN FAILED
Run failed.
dState changed from EngineRunRequested(3) to EngineRunFailed(4)
dState changed from EngineRunFailed(4) to EngineShutdownRequested(14)
dCALL: SHUTDOWN ENGINE
dNOTE: ENGINE SHUTDOWN FINISHED
dState changed from EngineShutdownRequested(14) to EngineShutdownFinished(15)
Debugger finished.
dState changed from EngineShutdownFinished(15) to DebuggerFinished(16)
It looks like the argument -qmljsdebugger=port:42957,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation added by Qt Creator doesn't end up causing the 42957 port to listen for incoming connections.
Any clues about what might be going wrong?
Any pointers appreciated :-)
The text was updated successfully, but these errors were encountered:
Apteryks
changed the title
[question] How can I use the QML debugger with this?
[question] How can I use the QML debugger?
Jun 26, 2024
Hi!
I'm trying to figure out why the QML debugger won't successfully connect to an instrumented Linphone. I'm building Linphone from source via Qt Creator (Debug profile). From the source, I understand that the QML Debugger is enabled for debug or relwithdebinfo builds, from linphone-app/CMakeLists.txt:
I'm using Qt with qtdeclarative 5.15.10, and I've verified that qtdeclarative is built with QML debug support and installs the
qmltooling
plugins.In Qt Creator, I've made sure that both the build settings have
QML debugging and profiling
set toEnable
, while theRun Settings
debbugger settings have theC++ debugger
set to enabled and theQML debugger
as well, and have rebuilt the project with these settings.Now suppose I put a breakpoint around
linphone-app/ui/views/App/Main/MainWindow.qml:250
, on the linevar model = CallsListModel.launchChat( sipAddress,0 )
The breakpoint appears as an
Unclaimed Breakpoint
. When launching the debug session, it hangs waiting for the debugger to connect to the application, but it never can -- the port isn't listening (wQML Debugger: Error: QAbstractSocket::ConnectionRefusedError
).Here's what I see in the Qt Creator debugger's log:
It looks like the argument
-qmljsdebugger=port:42957,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation
added by Qt Creator doesn't end up causing the 42957 port to listen for incoming connections.Any clues about what might be going wrong?
Any pointers appreciated :-)
The text was updated successfully, but these errors were encountered: