The Science of Debugging
Chapter 7


7.2 Starting the MSVC Debugger

Using the MSVC debugger is a bit more involved than just running any one given program. Load up your project as is noted in section xxx above, and compile it with debugging enabled (debugging profile/configuration). Then go to Build Start Debug Go. This will build the program if it's not already built, and start it.

Make sure the program is built into your circle bin directory. Select this by going to Project Settings, and selecting the 'Link' Tab. From there, set the Category listbox to 'General' and under the Output Filename textbox, type the full pathname (including executable) to the circle program. For example, c:\mymud\circle30bpl19\bin\circle.exe. Click 'Ok' when done. (Always click 'Apply' or 'OK' - which ever is valid - if not otherwise told to, after changing any options or settings).

You will need to add arguments to it, you'll need to go Project Settings, and select the Debug tab. Set the Category listbox to 'General', and you should see four lines below, where you can define your executable for the debug session, working directory, program arguments, and a fourth about remote execution . For the purpose of running circlemud , you'll need to to fill in the working directory, and arguments, these would be the base CircleMUD directory, and your standard arguments as if you were running the program by hand (such as -q 4000 to run in quick-mode on port 4000).

Note:
In the future, you can run the debugger by simply pressing F5 - if this works for you. That's right, many versions of MSVC (especially 5) will not work correctly with the hotkey;some don't enter debug mode, and others will attempt to compile without debugging information for some unknown reason. It's fixed (so I'm told) in all versions of MSVC 6.0, which is - as of this writing - up to patch level 5. The rest of you, take your best shot, hope it works. There's also a small menu button you can press, on the 'Build' and 'Build minibar'. They look like this:


You can hit the 'Go' button to start a debugging run. If you don't have this menu, here's how you get it; right click anywhere on the menu bar, or other attached bars in a blank spot; a list of bars to include should pop up, and all you need to do is click and add one of the two menus listed above ('build' or 'build minibar'). The graphic above is of the build minibar.



Index
7.1.5 It's a bird, It's a plane, it's super comment 7.3 Stopping the MSVC Debugger