Skip to content

Commit c0d2c38

Browse files
committed
git-gui: enable the Tk console when tracing/debugging on Windows
Without any standard channels the trace option is pretty useless on Win32 unless you can show the Tk console which captures such output. This also permits introspection of the running application to assist in debugging. Signed-off-by: Pat Thoyts <[email protected]>
1 parent 7ae1e72 commit c0d2c38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-gui.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
8383
puts stderr "source $name"
8484
uplevel 1 real__source $name
8585
}
86+
if {[tk windowingsystem] eq "win32"} { console show }
8687
}
8788

8889
######################################################################
@@ -675,6 +676,7 @@ bind . <Visibility> {
675676
if {[is_Windows]} {
676677
wm iconbitmap . -default $oguilib/git-gui.ico
677678
set ::tk::AlwaysShowSelection 1
679+
bind . <Control-F2> {console show}
678680
679681
# Spoof an X11 display for SSH
680682
if {![info exists env(DISPLAY)]} {

0 commit comments

Comments
 (0)