Hi Torsten, Indeed, Qt Creator is working perfectly, build, install and debug.
Just further question, since there is no .pro.user similar file, where does Qt Creator store those customized settings in the Project tab? Like: turned on build components, added Build Step for install, Command line arguments, etc. I see there is a auto generated file “qtcsettings.cmake” in build folder, but this only contains cmake build flag, no other settings. P.S. I am still checking why debug in VS Code is so slow. When run marble-qt via VS Code C/C++ Debug, below output is strange: -------- QSocketNotifier: Can only be used with threads started with QThread -------- And the program icon in taskbar is not the normal Marble icon, but same as VS Code icon. Looks like the debug marble-qt process is not spawned as normal launch? When I used to debug with VS Code for other Qt applications, it works fine, maybe there is something specific in Marble application? WANG Cui From: Torsten Rahn <tac...@t-online.de> Sent: Tuesday, March 21, 2023 1:06 AM To: 王璀 WANG Cui <iucg...@msn.com>; Mailinglist, Marble-Devel <marble-devel@kde.org> Subject: AW: How to debug marble-qt in build folder without sudo make install Hi Cui, QtCreator can load the CMakeLists.txt files natively - I'd recommend to use Qt Creator instead. A step of 10 seconds sounds indeed very slow. Maybe try again with QtCreator and gdb. Best regards Torsten -----Original-Nachricht----- Betreff: RE: How to debug marble-qt in build folder without sudo make install Datum: 2023-03-20T17:14:40+0100 Von: "王璀 WANG Cui" <iucg...@msn.com<mailto:iucg...@msn.com>> An: "Torsten Rahn" <tac...@t-online.de<mailto:tac...@t-online.de>>, "Mailinglist, Marble-Devel" <marble-devel@kde.org<mailto:marble-devel@kde.org>> Hi Torsten, I used below trick to avoid install those plugin .so files after each time change/rebuild: - Manually create /usr/local/lib/marble/plugins/ folder - Create symbolic link for every plugin .so like: sudo ln -f -s /home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/positionprovider/flightgear/FlightGearPositionProviderPlugin.so /usr/local/lib/marble/plugins/FlightGearPositionProviderPlugin.so - Now ./marble-qt can load all plugins from build folder directly and run as if being installed. -------- … Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/annotate/AnnotatePlugin.so" Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/aprs/AprsPlugin.so" Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/atmosphere/AtmospherePlugin.so" Marble::ParseRunnerPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/runner/cache/CachePlugin.so" … -------- For build/install, thanks for your recommendation, it is quite typical practice. Actually for convenience, I am using VSCode with CMake Tools addon and C/C++ addon, to build and debug accordingly. See attached screenshot please. However, the challenge I am facing now is, I can set breakpoint in source code and break when needed. But step the code is very slow, take more 10 seconds to step to next line. Not sure whether it is caused by symbolic links. I am seeking your advice, what is your way to debug marble? What tools are used? Any document/tutorial to refer? If install is mandatory, of course, I can do install for debug performance sake. BTW, you mentioned about using Qt Creator, but I don’t see any .pro file in marble repository, how to utilize Qt Creator for marble programing/debug? WANG Cui From: Torsten Rahn <tac...@t-online.de<mailto:tac...@t-online.de>> Sent: Monday, March 20, 2023 3:21 PM To: 王璀 WANG Cui <iucg...@msn.com<mailto:iucg...@msn.com>>; Mailinglist, Marble-Devel <marble-devel@kde.org<mailto:marble-devel@kde.org>> Subject: AW: How to debug marble-qt in build folder without sudo make install Hello Cui, > ./marble --marbledatapath=<prefix>/marble/data Oh that looks like the source directory. > Do you also need to do the manual install/copy step to setup environment? Yes that is the preferred way to do it. You can try to find your way keeping things in the build directory - and it's possible to do that - but it you need to make the adjustments to the data and plugin path in that case. So better do the install, e.g. like this: After doing the compilation via "make", have you actually installed the application (via make install)? Let me quickly tell how this works on the commandline: Create a build directory next to your sources - which I have located in ~/marble/sources in my example: tackat@tackat-ThinkPad-T440p:~/marble$ mkdir mybuild tackat@tackat-ThinkPad-T440p:~/marble$ cd mybuild/ (if you have Qt installed via the maintenance tool then you might need to tell where your Qt installation is e.g. via: export Qt5_DIR=/opt/Qt/5.14.2/gcc_64/) Start the build via: tackat@tackat-ThinkPad-T440p:~/marble/mybuild$ cmake ../sources Do the "install" step via: tackat@tackat-ThinkPad-T440p:~/marble/mybuild$ sudo cmake --build . --target all && sudo cmake --build . --target install If you use Qt Creator you probably need to add the last step under the project tab in the build section. Best regards Torsten