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
howto:panel_plugin_debug [2007/12/09 20:25] – nowiki syntax 88.172.125.130howto:panel_plugin_debug [2012/11/26 12:59] (current) – removed nick
Line 1: Line 1:
-====== Panel Plugin Debugging ====== 
- 
-An easy way to debug an external panel-plugin with Valgrind : 
- 
-  * in /usr/local/libexec/xfce4/panel-plugins/ (or where your plugins are 
-installed) rename the panel binary named foo-plugin to foo-plugin.real 
-  * create an executable shellscript named foo-plugin in the same place, 
-containing : 
- 
-  #!/bin/sh 
-  valgrind --log-file=/path/to/valgrind.output /path/to/panel-plugins/foo-plugin.real $@ 
- 
-  * add the plugin to the panel as usual 
-Note. It'll be really slow as wrapped in valgrind, but you'll be able to hunt memory leaks using tail -f /path/to/valgrind.output  
- 
- 
-==== Alternative way ==== 
-Edit your .desktop file of the plugin (for most easy results, directly in the source directory) and append .valgrind to the xfce-exec line. Then create a file like described above, but named xfce4-my-plugin.valgrind in the same location. It will never ever be overwritten by any of your subsequent installations, and your .desktop file won't destroy anything as well. Ah, make the .valgrind script executable as well. 
- 
-Pay attention to edit the xfce-exec line before checking into subversion or making a release. 
- 
-==== More senseful call to Valgrind ==== 
- 
-''%%valgrind --tool=memcheck --leak-check=full --show-reachable=yes -v --log-file=/home/user/valgrind.txt /usr/local/libexec/xfce4/panel-plugins/xfce4-sensors-plugin $@%%''