Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 22 and Version 23 of TipsForBugReports


Ignore:
Timestamp:
Mar 13, 2010, 9:51:00 PM (14 years ago)
Author:
datallah
Comment:

Change the "Preemptive Debug Logging" instructions to something that works on Windows 7. I'm sure that there is something cleaner, but I've wasted enough time on this already.

Legend:

Unmodified
Added
Removed
Modified
  • TipsForBugReports

    v22 v23  
    6060Pidgin just hiccuped, you want to file a ticket but you wish you had saved the debug log don't you? Here is a script to have it made for you all the time.
    6161
    62 Copy this to a *.bat file in your pidgin install directory and use a shortcut to it instead of pidgin.exe when starting pidgin. To make it even less intrusive you can change the icon to the pidgin icon and set the command window to open minimized in the properties of the shortcut (right click -> properties )
     62Create a `pidgin.bat` file somewhere on your system (your Documents folder is fine) (If you have Pidgin installed to somewhere other than the default location, update `PIDGIN_INST_DIR` to the appropriate value):
    6363{{{
    64 @ECHO off
    65 REM stay quiet
     64SET ProgramFiles(x86)
     65IF ERRORLEVEL 0 SET PIDGIN_INST_DIR=%ProgramFiles(x86)%\Pidgin
     66IF NOT ERRORLEVEL 0 SET PIDGIN_INST_DIR=%ProgramFiles%\Pidgin
     67
     68REM SET PIDGIN_INST_DIR=Z:\YourCustomPidginInstallationDirectory
     69
     70SET LOCALAPPDATA
     71IF ERRORLEVEL 0 SET DEBUG_DIR=%LOCALAPPDATA%\.purple\debuglogs
     72IF NOT ERRORLEVEL 0 SET DEBUG_DIR=%APPDATA%\.purple\debuglogs
    6673
    6774REM make sure the debug directory exists
    68 IF NOT EXIST debug mkdir debug
     75IF NOT EXIST "%DEBUG_DIR%" mkdir "%DEBUG_DIR%"
    6976
    7077REM get the date and time
    7178SET dt=%date%_%time%
    7279
    73 REM save the nice formatting
    74 SET odt=%date% %time%
    75 
    76 REM replace the / with -
     80REM replace the / with - (may or may not exist depending on your date format)
    7781SET dt=%dt:/=-%
    7882
    79 REM replace the ' ' with 0
     83REM replace the ' ' with 0 (may or may not exist depending on your date format)
    8084SET dt=%dt: =0%
    8185
    82 REM replace the : with .
     86REM replace the : with . (may or may not exist depending on your date format)
    8387SET dt=%dt::=.%
    8488
    85 REM remove the first 4 characters which are the day plus a space
    86 SET dt=%dt:~4%
    87 
    8889REM build the logfile name
    89 SET logfile="debug\%dt%.log"
     90SET logfile=%DEBUG_DIR%\%dt%.log
    9091
    9192REM remove the space that gets created for some reason...
    92 SET logfile=%logfile: =%
     93SET logfile=%logfile: =%
     94
     95REM quote logfile
     96SET logfile="%logfile%"
    9397
    9498REM write a nice header
    95 ECHO ------------------------------------------------- > %logfile%
    96 ECHO Pidgin Debug Log For %odt% >> %logfile%
     99ECHO -------------------------------------------------  > %logfile%
     100ECHO Pidgin Debug Log For %date% %time%                >> %logfile%
    97101ECHO ------------------------------------------------- >> %logfile%
    98102
    99 REM start pidgin without an extra command window
    100 START /B pidgin -d 2>&1 >> %logfile%
     103"%PIDGIN_INST_DIR%\pidgin.exe" -d 2>&1 >> %logfile%
    101104
    102 REM close this command window
    103105EXIT
    104106}}}
    105107
     108Create a `pidgin.vbs` file in the same directory as `pidgin.bat` was created above:
     109{{{
     110Set WshShell = WScript.CreateObject("WScript.Shell")
     111obj = WshShell.Run("pidgin.bat", 0)
     112}}}
     113
     114Create a shortcut to the `pidgin.vbs` file on your Desktop (or wherever is convenient) and use that to launch Pidgin.  You can assign the icon from pidgin.exe to the shortcut to make it look nice.
     115
     116
    106117== All other (non-Windows) OS users ==
    107118[wiki:GetABacktrace Get a backtrace]
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!