Game Development Reference
In-Depth Information
IDE of your choosing (though, of course, the menus and key presses will be differ-
ent). The screenshots specifically show the code from the tower defense game in
Chapter 14
,
“
Sample Game: Tower Defense for PC/Mac
.
” In order to debug that
game, you will need to put it into windowed mode, which can be done by setting
GlobalDefines.bFullScreen
to
false
.
Basic Breakpoint
A
breakpoint
on a line of code tells the debugger that whenever it reaches that
particular line, it should pause the program. To set a breakpoint in Visual Studio,
move the cursor to the line you'd like the breakpoint on and press F9 (alternat-
ively, you can click the grey column on the left side of the editor window). When a
breakpoint is hit, you can mouse over variables to see their current value. A break-
Figure B.1
A basic breakpoint in Visual Studio.