Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTCreator remote building and debugging
mssm last edited by
I'm trying different IDEs for remote building and debugging.
First I tried with KDevelop, remote building works quite well, but remote debugging still fails.
Now trying with QTCreator I got the build process started via ssh, but the output is not parsed for errors, so the error does not link to the corresponding line. Moreover I'm failing to attach to a remote process for debugging:
I have the kit for the remote target functional. I have some gdbserver running on the target like
gdbserver --remote-debug --attach localhost:8888 $(pgrep -f foo). In local qtcreator I do Debug->Start Debugging->Attach to Running debug server.
On the gdbserver debug I see something is attaching, but in qtcreator I get this error:
This does not seem to be a "Debug" build. Setting breakpoints by file name and line number may fail. Section .debug_info: Not found. Section .debug_abbrev: Not found. Section .debug_line: Not found. Section .debug_str: Not found. Section .debug_loc: Not found. Section .debug_range: Not found. Section .gdb_index: Not found. Section .note.gnu.build-id: Not found. Section .gnu.hash: Found. Section .gnu_debuglink: Not found.
The debug output is only a little compared to if I do myself in
gdb target remote targetsrv:8888. Actually that target remote takes some minutes to finish here as it is reading all objects remotely, but ok, one thing I would prefer some ssh gdb over gdbserver.
This is qt-creator-4.2.0 on Gentoo.
The qtcreator approach with kits and compilers seems to be more prepared for having a cross-compile toolchain and deploying binaries to (smaller) targets. Then qtcreator does not seem to be able to support some portable QTDIR that is not part of the system installation but available via NFS. In KDevelop I was adding all headers like /mnt/nfs/qt-everywhere-commercial-src-4.8.0/include/* to the project in order to have syntax completion etc. In qtcreator->Options->Build&Run->Qt Versions I tried adding such a remote version but it fails with Qt version is not properly installed.
Having a reference system with a custom make and toolchain it is easier just using that system for building and debugging instead of making efforts to clone the whole toolchain locally for cross-compilation.
Any idea if qtcreator can be used like this?