Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtCreator Remote Debugging



  • Using QtCreator Qt Creator 4.10.0

    Debugging to raspberry pi 4 as pi.. Built Qt 5.13.1 on Ubuntu Desktop 16.04
    I am able to build and deploy Qt5.13.1 built on Ubuntu Desktop to Raspberry Pi no problems.
    I am able to build and deploy my program no problems
    I am able to run my program both from the raspberry pi and remotely from ssh -X myprogram No problems

    From Qtcreator NO Go, no go for running and no go for debugging..

    So.. here is what I have seen and maybe someone can point me to the correct place..

    Testing the device "raspberry pi" from tools/options/.devices I get a remote login terminal.. but DISPLAY has not been exported, from the remote terminal on the device tab, I can do an export | grep DISPLAY nothing seen.. I manually force the display by doing a export DISPLAY=localhost:10.0 and bang I can remotely run my program no problems.. So at this point paths and ldd are all correct as my program will remotely run from the device tab.. ok so big deal ...

    Now from the PROJECT build and run... I tried to use run in terminal, for a test. Terminal comes up perfect.. but this time not only does the display env not set, but paths or nothing is set. Even if I export DISPLAY at this point and try to run the program manually from this remote shell on the run in terminal settings nothing because it cannot see any of the paths or lib paths or...

    Some check box or clicky clicky thing I am missing on the QtCreator..

    Help Mr QtCreator Wizard guys... what check box did I overlook.. gdb does in fact work fine, as I can step into main, and single step perfect until QApplication a(argc, argv); world breaks of course because all env are blank.

    Not that I need to debug remotely a lot, but some things need remote debugging as rpi is not the same at a full Ubuntu desktop ..

    Below makes perfect sense.. from the run in terminal that has a blank mind.. how to make in not blank.

    Listening on port 10000
    Remote debugging from host 192.168.199.18
    Process /home/pi/platform/scannersim created; pid = 4555
    Could not load shared library symbols for 3 libraries, e.g. /home/pi/platform/libplatform.so.3.
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.



  • Became much to complicated, so I just put nfsserver on pi and mount / as sysroot. Way too many places to set solib-search-path" or "set sysroot"? just mounting the entire sd as an nfs mount to sysroot was a lot easier.

    On the display, the click check box and enter the DISPLAY did not work for me, I had to actually make an env value in Build Environment and place it there. DISPLAY localhost:10.0 there... It did not work for me in the run in terminal click to forward to this display... don't know if I am doing something wrong there or if this is bug.. but the correct place for me was in the Build Environment ...


Log in to reply