|
|
=Debugging the shell extension=
|
|
|
==Windows==
|
|
|
#Enable Debugging in the configuration dialog of tortoisehg
|
|
|
#start a new explorer or restart the explorer:
|
|
|
** new explorer: {{{explorer /separate}}} (no path!)
|
|
|
** kill all explorer in the task manager (desktop disapears) and execute explorer (in a dos window or on the start entry of the task manager) or
|
|
|
** log off and log on
|
|
|
|
|
|
See also http://msdn.microsoft.com/en-us/library/cc144064(VS.85).aspx for some info bits about Running and Testing Shell Extensions on Windows
|
|
|
|
|
|
==Nautilus==
|
|
|
set the environment variable DEBUG_THG for nautulus:
|
|
|
* testing in separate process: {{{DEBUG_THG=Ne TMPDIR=/tmp/anydir/ --no-desktop nautilus [path]}}}
|
|
|
* testing with main instance: {{{nautilus -q; DEBUG_THG=NOe nautilus}}} (Quits all nautilus windows!)
|
|
|
* permanent: set DEBUG_THG in a file which is read on session start (~/.profile, ~/.xprofile)
|
|
|
|
|
|
===Values of DEBUG_THG===
|
|
|
Uppercase letters for modules, lowercase letters for specific parts of them
|
|
|
|= |=Module|
|
|
|
|O|OverlayCache|
|
|
|
|N|Nautilus|
|
|
|
|
|
|
|
|
|
|= |=part|
|
|
|
|e|Error (in module)|
|
|
|
|
|
|
===restart nautilus===
|
|
|
* killall nautilus (the session restarts nautilus automatically, stdin and stdout go to ~/.xsession-errors)
|
|
|
* nautilus -q; nautilus (stdin and stdout are on the console)
|
|
|
|
|
|
= Debugging Dialogs =
|
|
|
|
|
|
On the stable branch, the only way to debug errors in the dialogs from a binary install is to run the hgtk command on the command line and then watch that window as you try different operations in the dialog. You should be able to catch error messages as they appear.
|
|
|
|
|
|
If you have a bit of python knowledge, you can also use: hgtk --debugger <command>
|
|
|
|
|
|
On the crew branch, stderr is being piped to a buffer which is being inspected at your program exit. If any serious errors (tracebacks, etc) are found in the stderr buffer the entire buffer is sent to the bug report tool so the user can (should) report a bug. If you suspect there are errors that are not being reported, you can set the environment variable **THGDEBUG** to any value to disable the stderr buffering (so the messages come right out just like they did on the stable branch) |