Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xfce:xfce4-panel:debugging [2020/09/26 09:41] – grammar improvement kevinbowenxfce:xfce4-panel:debugging [2024/01/03 16:37] (current) – Formatting gael
Line 36: Line 36:
  
 To detect memory leaks and corruptions, it is also possible to run plugins in [[http://valgrind.org/|valgrind]]. For this, start the panel with ''PANEL_DEBUG=valgrind''. Logs will be written to the same location as the //gdb// logs. To detect memory leaks and corruptions, it is also possible to run plugins in [[http://valgrind.org/|valgrind]]. For this, start the panel with ''PANEL_DEBUG=valgrind''. Logs will be written to the same location as the //gdb// logs.
 +
 +==== Running the plugin as internal ====
 +
 +When you don't just want to collect a backtrace after a crash, it can sometimes be more convenient to use the above debugging tools directly on the panel, running the plugin as internal (i.e. in the same process as the panel). It's also more convenient in this case to run only the plugin to be debugged on a single panel, which requires you to make a backup of your configuration beforehand.
 +
 +The procedure is as follows:
 +  * Save the panel configuration via [[apps:xfce4-panel-profiles:start|xfce4-panel-profiles]].
 +  * Edit the plugin desktop file (normally located in ''/usr/share/xfce4/panel/plugins/'') to have ''X-XFCE-Internal=true'' (add line if necessary).
 +  * Create a new blank panel and delete all others.
 +  * Add the plugin to be debugged to the new panel.
 +  * Run ''xfce4-panel -q''.
 +  * Run ''gdb xfce4-panel'' or ''valgrind xfce4-panel'', with any appropriate options and/or environment variables.
 +  * When debugging is complete, restore configuration via xfce4-panel-profiles.
 +
 +Note that some bugs may only appear when the plugin is run as internal or external. This is typically the case for bugs related to the way external plugins are embedded in the panel (XEmbed protocol on X11, embedded compositor or layer-shell window stacking on Wayland). However, the essential behavior of the plugin remains the same in both execution modes.
  
 [[|Back to Top]] [[|Back to Top]]
 ---- ----
 [[:xfce:xfce4-panel:start:|Back to xfce4-panel main page]] [[:xfce:xfce4-panel:start:|Back to xfce4-panel main page]]