Need help debugging Gnome Clocks (Vala) in Builder

I have a fresh fork from the Gnome Clocks repository, and it runs as expected when I “Run” it through Builder using the org.gnome.clocks.json build configuration.

I’m trying to inspect a value by setting a breakpoint. When I try “Run with Debugger”, nothing happens (regardless of me putting the breakpoint). These are the last few lines in the Build Output:

...
Installing symlink pointing to ../../../C/gnome-clocks/figures/org.gnome.clocks.svg to /app/share/help/ru/gnome-clocks/figures/org.gnome.clocks.svg
Installing symlink pointing to ../../../C/gnome-clocks/figures/org.gnome.clocks.svg to /app/share/help/sv/gnome-clocks/figures/org.gnome.clocks.svg
Installing symlink pointing to ../../../C/gnome-clocks/figures/org.gnome.clocks.svg to /app/share/help/tr/gnome-clocks/figures/org.gnome.clocks.svg
Installing symlink pointing to ../../../C/gnome-clocks/figures/org.gnome.clocks.svg to /app/share/help/uk/gnome-clocks/figures/org.gnome.clocks.svg
Running custom install script '/usr/bin/glib-compile-schemas /app/share/glib-2.0/schemas'
Running custom install script '/usr/bin/gtk4-update-icon-cache -q -t -f /app/share/icons/hicolor'
Running custom install script '/usr/bin/update-desktop-database -q /app/share/applications'

This could be a simple fix, but I haven’t found much info online. How can I run Clocks with the debugger such that it actually opens instead of doing nothing?

Edit: Here’s a quick video showing the issue: https://www.youtube.com/watch?v=uXj7xI0Rh2w

1 Like

Can you share the output in the “Run” console?

Yes! Here it is:

Application started at 15:05:14
Application exited

Note that I have already closed any other instance of gnome-clocks.

Can you open a “runtime terminal” and launch gnome-blocks from there?

Right, that runs the program normally (which works. see below), not in debug mode.

sh-5.2$ gnome-clocks
Gsk-Message: 22:25:20.204: Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkWaylandToplevel': Failed to create EGL display


(org.gnome.clocksDevel:50): org.gnome.ClocksDevel-WARNING **: 22:25:20.424: geocoding.vala:42: Failed to connect to GeoClue2 service: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: Location services disabled

This happens because gnome-clocks is already running in background.
Kill the process and then in Builder click “Run” or “Run with Debugger”.

1 Like

That’s it! It worked! I don’t know how I missed it.
Thanks a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.