<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal-compose;
font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:等线">Hi Torsten,<o:p></o:p></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:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线">- Manually create /usr/local/lib/marble/plugins/ folder<o:p></o:p></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<o:p></o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线">--------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ZH-CN" style="font-family:等线">…</span><span style="font-family:等线"><o:p></o:p></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"<o:p></o:p></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"<o:p></o:p></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"<o:p></o:p></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"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="ZH-CN" style="font-family:等线">…</span><span style="font-family:等线"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线">--------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线"><o:p> </o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线"><o:p> </o:p></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.<o:p></o:p></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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线">If install is mandatory, of course, I can do install for debug performance sake.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线"><o:p> </o:p></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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线">WANG Cui<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:等线"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Torsten Rahn <tackat@t-online.de> <br>
<b>Sent:</b> Monday, March 20, 2023 3:21 PM<br>
<b>To:</b> <span lang="ZH-CN" style="font-family:宋体">王璀</span> WANG Cui <iucgnaw@msn.com>; Mailinglist, Marble-Devel <marble-devel@kde.org><br>
<b>Subject:</b> AW: How to debug marble-qt in build folder without sudo make install<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Hello Cui,</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:等线;color:black">> ./marble --marbledatapath=<prefix>/marble/data</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:等线;color:black">Oh that looks like the source directory.</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><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><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><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><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:等线;color:black">So better do the install, e.g. like this:</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><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><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:等线;color:black">Let me quickly tell how this works on the commandline:</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><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><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="margin:0in"><span style="font-size:10.0pt;font-family:等线;color:black">tackat@tackat-ThinkPad-T440p:~/marble$ mkdir mybuild</span><o:p></o:p></p>
<p style="margin:0in"> <o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">tackat@tackat-ThinkPad-T440p:~/marble$ cd mybuild/</span><o:p></o:p></p>
<p style="margin:0in"><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><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">Start the build via:</span><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">tackat@tackat-ThinkPad-T440p:~/marble/mybuild$ cmake ../sources</span><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">Do the "install" step via:</span><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:12.0pt;margin-left:0in">
<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><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<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><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">Best regards</span><o:p></o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:3.75pt;margin-bottom:0in;margin-left:0in">
<span style="font-size:10.0pt;font-family:等线;color:black">Torsten</span><o:p></o:p></p>
</div>
</body>
</html>