<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title></title></head><body><p style="margin: 0px;"><span style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;text-decoration:none">Hi Cui,</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;text-decoration:none">QtCreator can load the CMakeLists.txt files natively - I'd recommend to use Qt Creator instead.</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;text-decoration:none">A step of 10 seconds sounds indeed very slow. Maybe try again with QtCreator and gdb.</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Best regards</p>
<p style="margin: 0px;">Torsten</p>
<p style="margin: 0px;"><span style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000;text-decoration:none"> </span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">-----Original-Nachricht-----</p>
<p style="margin: 0px;">Betreff: RE: How to debug marble-qt in build folder without sudo make install</p>
<p style="margin: 0px;">Datum: 2023-03-20T17:14:40+0100</p>
<p style="margin: 0px;">Von: "王璀 WANG Cui" <iucgnaw@msn.com></p>
<p style="margin: 0px;">An: "Torsten Rahn" <tackat@t-online.de>, "Mailinglist, Marble-Devel" <marble-devel@kde.org></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"> </p>
<div style="position: relative; color: #000000; font: 12px Arial,Helvetica,sans-serif;">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family: 等线;">Hi Torsten,</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">I used below trick to avoid install those plugin .so files after each time change/rebuild:</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">- Manually create /usr/local/lib/marble/plugins/ folder</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">- 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</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">- Now ./marble-qt can load all plugins from build folder directly and run as if being installed.</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">--------</span></p>
<p class="MsoNormal"><span lang="ZH-CN" style="font-family: 等线;">…</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/annotate/AnnotatePlugin.so"</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/aprs/AprsPlugin.so"</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">Marble::RenderPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/render/atmosphere/AtmospherePlugin.so"</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">Marble::ParseRunnerPlugin plugin loaded from "/home/ubuntu/Git/GitHub/KDE/marble-vscode/build/Debug/src/plugins/runner/cache/CachePlugin.so"</span></p>
<p class="MsoNormal"><span lang="ZH-CN" style="font-family: 等线;">…</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">--------</span></p>
<p class="MsoNormal"><span style="font-family: 等线;"> </span></p>
<p class="MsoNormal"><span style="font-family: 等线;">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.</span></p>
<p class="MsoNormal"><span style="font-family: 等线;"> </span></p>
<p class="MsoNormal"><span style="font-family: 等线;">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.</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">I am seeking your advice, what is your way to debug marble? What tools are used? Any document/tutorial to refer?</span></p>
<p class="MsoNormal"><span style="font-family: 等线;">If install is mandatory, of course, I can do install for debug performance sake.</span></p>
<p class="MsoNormal"><span style="font-family: 等线;"> </span></p>
<p class="MsoNormal"><span style="font-family: 等线;">BTW, you mentioned about using Qt Creator, but I don<span lang="ZH-CN">’</span>t see any .pro file in marble repository, how to utilize Qt Creator for marble programing/debug?</span></p>
<p class="MsoNormal"><span style="font-family: 等线;"> </span></p>
<p class="MsoNormal"><span style="font-family: 等线;">WANG Cui</span></p>
<p class="MsoNormal"><span style="font-family: 等线;"> </span></p>
<div>
<div style="border: none; border-top: solid #E1E1E1 1.0pt; padding: 3.0pt 0in 0in 0in;">
<p class="MsoNormal"><strong>From:</strong> Torsten Rahn <tackat@t-online.de> <br /><strong>Sent:</strong> Monday, March 20, 2023 3:21 PM<br /><strong>To:</strong> <span lang="ZH-CN" style="font-family: 宋体;">王璀</span> WANG Cui <iucgnaw@msn.com>; Mailinglist, Marble-Devel <marble-devel@kde.org><br /><strong>Subject:</strong> AW: How to debug marble-qt in build folder without sudo make install</p>
</div>
</div>
<p class="MsoNormal"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: &quot; arial&quot;,sans-serif;color: black;">Hello Cui,</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">> ./marble --marbledatapath=<prefix>/marble/data</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Oh that looks like the source directory.</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">> Do you also need to do the manual install/copy step to setup environment?</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">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.</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">So better do the install, e.g. like this:</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">After doing the compilation via "make", have you actually installed the application (via make install)?</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Let me quickly tell how this works on the commandline:</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Create a build directory next to your sources - which I have  located in ~/marble/sources in my example:</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">tackat@tackat-ThinkPad-T440p:~/marble$ mkdir mybuild</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">tackat@tackat-ThinkPad-T440p:~/marble$ cd mybuild/</span></p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">(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/)</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Start the build via:</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">tackat@tackat-ThinkPad-T440p:~/marble/mybuild$ cmake ../sources</span></p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Do the "install" step via:</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">tackat@tackat-ThinkPad-T440p:~/marble/mybuild$ sudo cmake --build . --target all && sudo cmake --build . --target install </span></p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">If you use Qt Creator you probably need to add the last step under the project tab in the build section.</span></p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Best regards</span></p>
<p style="margin: 0px;"><span style="font-size: 10.0pt; font-family: 等线; color: black;">Torsten</span></p>
</div>
</div></body></html>