FYI, I’ve finally found a way to run Valgrind with arbitrary options on the executable within the runtime. Here’s the trick:
- Run Gnome builder with Flatpak from the command line:
flatpak run --runtime=org.gnome.Sdk org.gnome.Builder
- In another terminal window use the command
flatpak ps
to get the instance id for the builder - Finally run Valgrind using flatpak:
flatpak enter <INSTANCE_ID> valgrind [VALGRIND_OPTIONS] <EXECUTABLE>
Example: flatpak enter 4198261558 valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all --log-file="/home/vezir/Projects/fluidapp/valgrind.log" /home/vezir/.var/app/org.gnome.Builder/cache/gnome-builder/projects/fluidapp/builds/de.teamaux.Fluidapp.json-flatpak-org.gnome.Platform-42-x86_64-master/src/fluidapp