I cross-compiled Qt5.12 in my laptop and installed it on a Raspberry Pi 3 that runs Raspbian Stretch OS.
I'm trying to remote debug (from QtCreator) applications running on RPi.

When I run my Qt apps from RPi terminal with a command like
Qt Code:
  1. ./app -platform xcb
To copy to clipboard, switch view to plain text mode 
it works fine, but when I try to run the same app from a remote debug session I get the following output:

Qt Code:
  1. Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
  2. Do you need "set solib-search-path" or "set sysroot"?qt.qpa.xcb: could not connect to display
  3. qt.qpa.xcb: could not connect to display
  4. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" even though it was found.
  5. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
  7. Available platform plugins are:
  8. eglfs (from /usr/local/qt5pi/plugins/platforms),
  9. linuxfb (from /usr/local/qt5pi/plugins/platforms),
  10. minimal (from /usr/local/qt5pi/plugins/platforms),
  11. minimalegl (from /usr/local/qt5pi/plugins/platforms),
  12. offscreen (from /usr/local/qt5pi/plugins/platforms),
  13. vnc (from /usr/local/qt5pi/plugins/platforms),
  14. webgl (from /usr/local/qt5pi/plugins/platforms),
  15. xcb (from /usr/local/qt5pi/plugins/platforms),
  16. eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
To copy to clipboard, switch view to plain text mode 
Has anyone ever experienced this? What could I try to fix that?