Xfce Wiki

Sub domains
 

Differences

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

Link to this comparison view

Next revision
Previous revision
de:howto:panel_plugin_debug [2008/09/05 11:22] – create from EN page w3llyde:howto:panel_plugin_debug [2010/10/02 17:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Panel Plugin Debugging ======+====== Fehlerbehebung externer Leistenmodule ======
  
-An easy way to debug an external panel-plugin with Valgrind :+Eine möglichkeit nach Fehlern zu suchen bietet Valgrind:
  
-  * In /usr/local/libexec/xfce4/panel-plugins/ (or where your plugins are installedrename the panel binary named foo-plugin to foo-plugin.real +  * In dem Verzeichnis /usr/local/libexec/xfce4/panel-plugins/ (oder wo Sie ihre Plugins Installiert habenbenennen Sie die Panel-Binär Datei um. (Beispielsweise foo-plugin zu foo-plugin.real) 
-  * Create an executable shellscript named foo-plugin in the same place, containing :+  * Erstellen Sie ein ausführbares Shell-Skript, welches dann den Namen foo-plugin hat un an der selben stelle ist. (siehe Beispiel oben)
  
   #!/bin/sh   #!/bin/sh
   valgrind --log-file=/path/to/valgrind.output /path/to/panel-plugins/foo-plugin.real $@   valgrind --log-file=/path/to/valgrind.output /path/to/panel-plugins/foo-plugin.real $@
  
-  * Add the plugin to the panel as usual +  * Fügen Sie nun wie gewohnt das Plugin in ihre Leiste hinzu.
-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 +
  
 +  * Schauen Sie nach, ob Sie eventuell fehler finden. Sie können hierfür folgendes nutzen.
  
-===== Alternative way ===== +  tail -f /path/to/valgrind.output
-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.+{{wiki:information.png}} Durch das valgrind ist natürlich der Prozess verlangsamt, aber es erlaubt besser nach Fehlern zu schauen.
  
-===== 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 $@%%''+===== Alternativ ===== 
 +Editieren Sie ihre .desktop Datei von dem Plugin und fügen .valgrind in die xfce-exec Zeile. Anschließend erstellen Sie eine Datei wie diese, die Sie editiert hatten, nur schreiben noch ein .valgrind dahinter und machen das Skript ausführbar.
  
 +{{wiki:information.png}} Dieses hat den Vorteil, das dabei nichts Überschrieben wenn Sie das Programm erneut Installieren. Die .desktop Datei wird nicht zerstört.
 +
 +===== Noch effektiver Valgrind einsetzen =====
 +
 +''%%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 $@%%''