Changes between Version 1 and Version 2 of Debugging


Ignore:
Timestamp:
Sep 13, 2013, 8:15:09 PM (11 years ago)
Author:
historic_bruno
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging

    v1 v2  
    1313* [http://www.microsoft.com/visualstudio Visual Studio] - the basic tool for debugging the game on Windows. Break into the debugger on a breakpoint, on a crash or assertion failure, or any other time. Visual C++ Express is free and contains similar debugging features. Can be used to analyze crash dumps and get a useful call stack.
    1414* [http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx WinDbg] - part of the Windows SDK, a very powerful debugging suite which is primarily command line driven, unlike Visual Studio. Analyze crashes in more detail than VS.
    15 * [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] - If you don't run the process in a debugger, !DebugView lets you view its normally hidden debug output.
    16 * [http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx VMMap] - Free tool from Microsoft to analyze the virtual memory usage of a process; shows fragmentation, can be useful for observing memory leaks or
     15* [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] - If you don't run the process in a debugger, !DebugView lets you view its normally hidden debug output. Users can install and run this much more easily than a full debugging suite.
     16* [http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx VMMap] - Free tool from Microsoft to analyze the virtual memory usage of a process; shows fragmentation, can be useful for observing memory leaks or finding why a large allocation fails.
    1717* [http://www.gremedy.com/ gDEBugger] - Debug and profile OpenGL applications. Useful for debugging GL errors and finding unexpected behavior.
    1818* [http://notepad-plus-plus.org/ Notepad++] - small, simple, powerful text editor. You need a decent text editor on Windows.
    1919* A hex editor, like [http://home.gna.org/bless/ Bless] - useful for examining binary simulation state dumps, either for saved games or serialization errors.
     20
     21TODO: I know there are more...
    2022
    2123=== Linux ===
     
    2830=== OS X ===
    2931
    30 * [https://developer.apple.com/xcode/ Xcode] - free IDE for development on OS X, also has suite of debugging tools
     32* [https://developer.apple.com/xcode/ Xcode] - free IDE for development on OS X, also has suite of debugging tools.
    3133* gdb
    3234
    3335== Debugging Crashes ==
    3436
    35 You want two things when debugging crashes: 1) steps to reproduce, 2) a call stack (i.e. back trace).
     37You want two things when debugging crashes: 1) steps to reproduce, and 2) a call stack (i.e. back trace).
    3638
    3739=== Reproducing the crash ===
    3840
    3941Important info to gather:
    40 * Build environment - custom build, SVN autobuild, or release package? Which compiler?
     42* Build environment - custom build, SVN autobuild, or release package? Which compiler version?
    4143* Hardware (e.g. `system_info.txt`)
    4244* Operating system (e.g. `system.info.txt`)
     
    4648* What are the minimal steps to get the crash? Is it consistent?
    4749
    48 There are many different causes of crashes (running out of memory, heap corruption, invalid pointers or iterators, buggy drivers - to name only a few). Sometimes they are only reproducible with one OS, one type of GPU drivers, one version of a compiler, one type of CPU, or only after following a complex series of steps. Collecting the above information can point you in the right direction.
     50There are many different causes of crashes (running out of memory, heap corruption, invalid pointers or iterators, buggy drivers - to name only a few). Sometimes they are only reproducible with one OS, one type of GPU drivers, one version of a compiler, one type of CPU, or only after following a complex series of steps. Collecting the above information can point you and others in the right direction.
    4951
    50 Sometimes, but not always, when the game crashes it will create a `crashlog.txt` in the log directory (see GameDataPaths). This file contains basic system info and often a call stack. On windows, a `crashlog.dmp` may also be created.
     52Sometimes, but not always, when the game crashes it will create a `crashlog.txt` in the log directory (see GameDataPaths). This file contains basic system info and often a call stack. On Windows, a `crashlog.dmp` may also be created, from which a call stack can be obtained.
    5153
    5254=== Call stack on Windows ===