AW: How to debug marble-qt in build folder without sudo make install
Torsten Rahn
tackat at t-online.de
Mon Mar 20 17:06:01 GMT 2023
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" <iucgnaw at msn.com>
An: "Torsten Rahn" <tackat at t-online.de>, "Mailinglist, Marble-Devel"
<marble-devel at 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 <tackat at t-online.de>
Sent: Monday, March 20, 2023 3:21 PM
To: 王璀 WANG Cui <iucgnaw at msn.com>; Mailinglist, Marble-Devel
<marble-devel at 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 at tackat-ThinkPad-T440p:~/marble$ mkdir mybuild
tackat at 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 at tackat-ThinkPad-T440p:~/marble/mybuild$ cmake ../sources
Do the "install" step via:
tackat at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20230320/9d7d38ed/attachment.htm>
More information about the Marble-devel
mailing list