Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howto:panel_plugin_debug [2009/01/14 07:31] – 69.157.9.187 | howto:panel_plugin_debug [2010/10/02 17:26] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 28: | Line 28: | ||
{{wiki: | {{wiki: | ||
- | ==== More useful call to Valgrind | + | === More useful call to Valgrind === |
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --leak-check=full \ | G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --leak-check=full \ | ||
Line 46: | Line 46: | ||
#!/bin/sh | #!/bin/sh | ||
- | gdb -ex r -ex bt -ex q --args / | + | gdb -ex r -ex bt -ex continue |
> $HOME/ | > $HOME/ | ||
+ | |||
+ | === Using GDB on running instances === | ||
If you want an interactive debug session with GDB, you can simply find the process id of the plugin by running | If you want an interactive debug session with GDB, you can simply find the process id of the plugin by running | ||
- | | + | |
+ | ... | ||
+ | (gdb) continue | ||
- | which will find the PID of clipman, and debug it using the debug symbols in / | + | which will find the PID of clipman, and debug it using the debug symbols in / |
- | | + | |
Again, the plugin must already be loaded for this to work. | Again, the plugin must already be loaded for this to work. | ||
+ | |||
+ | ===== Temporarily capturing messages to stdout and stderr ===== | ||
+ | |||
+ | * Add the plugin to the panel | ||
+ | * Exit the panel: | ||
+ | |||
+ | $ xfce4-panel -x | ||
+ | |||
+ | * Start panel capturing stdout and stderr to file. Note that this will capture all messages from the panel, including all plugins, to ' | ||
+ | |||
+ | $ xfce4-panel > file 2>&1 & disown | ||
+ | |||
+ | * When done capturing, exit the panel and start it again: | ||
+ | |||
+ | $ xfce4-panel -x | ||
+ | $ xfce4-panel & disown | ||
====== Some tips ====== | ====== Some tips ====== | ||
* By creating your own desktop entry file, it will never get overwritten by any installation, | * By creating your own desktop entry file, it will never get overwritten by any installation, | ||
- | * You can point the Exec= key to your development directory, for instance / | + | * You can point the Exec= key to your development directory, for instance / |