Table of Contents

Custom initialization script

Sometimes it is necessary to run some commands just after debugger has been started. WinGDB supports such case through custom scripts. User can provide path to script in dialog Launch Process, Attach Process or Examine Core Dump in field 'Custom initialization script'.

Syntax of script is simple. Single line may contain only one gdb command or comment, eventually it is empty. Line is treated as comment if it begins with two slashes (//) or hash (#). Blank characters at the beginning of line are ignored. There is no limit for number of lines.

Sample of script (there are two empty lines intentionally):
Output generated by script is redirected into VisualStudio console (pane "Debug").

CAUTION!
All commands are allowed to run through custom script, but please proceed with them carefully, because they may change the way GDB bahaves and introduce negative side-effects for WinGDB operations.

All breakpoints set through custom script are not visible in Visual Studio environment, but GDB sees them and reacts as usually.


Currently WinGDB supports scripts which are available on local file system only. If there is need to run scripts which are located on remote machine, then please let us know about it. The same if you have any problems with custom scripts.

Table of Contents


Copyright (C) 2008-2010 WinGDB.com. All rights reserved.