Commonly used debugging tools
There are some relatively simple but commonly used debugging tools that might answer questions of for example why your installation of FlightGear will not run properly or at all, why an aircraft might have problems or why flying in a certain area always cause FlightGear crashes.
The more useful of those tools are the console window (also known as the "black box" or confusingly the "command line"), the fgfs.log file and the property browser.
There are of course times when these will not do, and sometimes one would have to compile FlightGear from source and add some additional debugging features to find some bugs.
Console and startup log output
Debug levels
Before we go any further we should mention the debug level setting (also known as log level). When FlightGear runs it will output information on various things. As a default only things that are expected to cause troubles are output, but by setting a higher debug level more information will be shown. At the highest debug level one can expect FlightGear to run slow due to all the debug output.
There are five debug levels:[1]
- Bulk
- Will output very frequent messages. Using this setting might slow down FlightGear a lot, but might show problems not otherwise found.
- Debug
- Will output less frequent debug messages.
- Info
- Will output informatory messages.
- Warn
- Will output messages about possibly impeding problems.
- Alert
- Will output messages about very possibly impeding problems. This is the default level.
Setting the debug level
Command line
Note Debug levels must be lowercase. For example debug, not .
|
Add --log-level=debug to your command line.
fgfs.log
The startup log file contains nearly the same information that is output on the console.
The purpose of the log file is to capture debugging output in a way that is robust for users, in essence that just work, and that capture errors that happen. That is in essence useful when a problem occur since it was already enabled.
The level defaults to info because a lower level would not contain enough detail for debugging, but a higher level, for example debug, the files would be huge for a long FlightGear session.
Finding fgfs.log
- Mac
~/Library/Application Support/FlightGear/fgfs.log- Windows
Note Open C:\Users\user name\AppData\Roaming\ by opening the Run app, entering %AppData%, then clicking OK. [2]
|
C:\Users\user name\AppData\Roaming\flightgear.org\fgfs.log- Linux
~/.fgfs/fgfs.log
Property browser
|
|
The property browser is a tool useful for many purposes. It might for example tell if a property is tied and can not be written to.
Nasal namespace browser
|
|
Nasal Namespace Browser is an addon that allows the user to peek at the internal state of Nasal.
Related content
Wiki articles
References
- ↑ That are relevant for the console window and log file. See [GitLab]/flightgear/simgear/2ab0122124169b0d6ac900423e76d2437ed22e98//simgear/debug/debug_types.h#L47.
- ↑ Freecodecamp has more details and another method to enter the AppData folder.