DebugMode: Difference between revisions

From The Battle for Wesnoth Wiki
No edit summary
 
Ott (talk | contribs)
mNo edit summary
Line 1: Line 1:
== Debug Mode ==
== Debug Mode ==
The game can be built to support debugging
by supplying ''--enable-debug'' as an argument to ''configure'' during
the build process.  Currently this enables
a few code snippets for the benefit of an external debugging tool like ''gdb'',
and calls the compiler with ''-g'' and ''-O0'' flags.
You probably don't want to strip a debugging build, since the symbols
are needed for the debugging tool.
Note than an unstripped debug build on linux is over 80MB, compared to 2-3MB stripped.
It is a good idea to run a debug build of the game if you do development,
since it can be necessary to diagnose serious problems.


Running the game with commandline option ''--debug'' or ''-d''
Running the game with commandline option ''--debug'' or ''-d''
enables '''debug mode''' within the game.
enables '''debug mode''' within the game.
This works whether ''--enable-debug'' was used to build the game or not.
Debug mode displays additional information, and enables
context menu options to create units and changing unit sides.
Debug mode can also be enabled within the game using :debug (see [[CommandMode]]),
and on Mac versions of the game, by holding down the Option key when
starting Wesnoth.
== Debug mode is disabled when you play a network multiplayer game. ==


Debug mode also enables some additional commands in [[CommandMode]].
Debug mode displays additional information.  It also enables
context menu options to create units anywhere on the map, changing unit sides, and some additional [[CommandMode]] commands.  If you create units in debug mode, you can then use the :unit command to set the unit's attributes (see [[CommandMode]]).
 
Debug mode can also be enabled within the game using :debug (see [[CommandMode]]), and on Mac versions of the game, by holding down the Option key when starting Wesnoth.
 
''' Debug mode is disabled when you play a network multiplayer game. '''
 
== Building the game with extra debugging ==
 
The game can be built to support debugging by supplying ''--enable-debug'' as an argument to ''configure'' during the build process.  Currently this enables a few code snippets for the benefit of an external debugging tool like ''gdb'',
and calls the compiler with ''-g'' and ''-O0'' flags.
You probably don't want to strip a debugging build, since the symbols are needed for the debugging tool.


Debug mode also adds a new context menu item: right click and select 'Create Unit'
An unstripped debug build on linux is over 80MB, compared to 2-3MB stripped.  It is a good idea to run a debug build of the game if you do development, since it can be necessary to diagnose serious problems.
and you will be able to create any unit anywhere on the map.
You can then use the :unit command to set the unit's attributes (see [[CommandMode]]).


== See Also ==
== See Also ==
Line 32: Line 23:
* [[CommandMode]]
* [[CommandMode]]
* [[DeveloperResources]]
* [[DeveloperResources]]

Revision as of 03:51, 15 November 2005

Debug Mode

Running the game with commandline option --debug or -d enables debug mode within the game.

Debug mode displays additional information. It also enables context menu options to create units anywhere on the map, changing unit sides, and some additional CommandMode commands. If you create units in debug mode, you can then use the :unit command to set the unit's attributes (see CommandMode).

Debug mode can also be enabled within the game using :debug (see CommandMode), and on Mac versions of the game, by holding down the Option key when starting Wesnoth.

Debug mode is disabled when you play a network multiplayer game.

Building the game with extra debugging

The game can be built to support debugging by supplying --enable-debug as an argument to configure during the build process. Currently this enables a few code snippets for the benefit of an external debugging tool like gdb, and calls the compiler with -g and -O0 flags. You probably don't want to strip a debugging build, since the symbols are needed for the debugging tool.

An unstripped debug build on linux is over 80MB, compared to 2-3MB stripped. It is a good idea to run a debug build of the game if you do development, since it can be necessary to diagnose serious problems.

See Also

This page was last edited on 15 November 2005, at 03:51.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.