Copyright ã1996 by NeXT Software, Inc.  All Rights Reserved.

;RunningTheProgramInTheDebugger.rtfd;;¬  Next Section

Startingadebuggingsession;¬Starting a debugging session

1	Click the launch button to bring up the Launch panel. 

2	If necessary, click the checkmark button in the Launch panel to set the executable name and environment. 

3	Click the debug button to start the debugger. 

Or

3	Click the launch button to run your program without debugging. 

You can use Project Builder's Launch panel to run your program in the debugger or, if you want, outside of the debugger. The Launch panel provides an interface to the Free Software Foundation's gdb debugger. 

¬

gdb is a command line tool, and it has a rich command-line interface. Project Builder provides a user interface for the most common debugging tasks. You perform other debugging tasks using the gdb command line interface. 

After gdb starts up, you can click the run button to start up your program. 

If the Launch panel isn't displaying the name of the project executable in its titlebar, you need to set it in the Launch Options panel before you can run or debug the program. Needing to set the executable usually occurs when your project contains subprojects or builds a binary that doesn't run on its own (for example, it's a framework or a loadable bundle). 

¬

Project Builder automatically includes debugging symbols in your program if you use the default build target. See Chapter€9, ªBuildingº for more information on building a program.  ;../09_Building/Building.rtfd;;¬

For a complete list of gdb commands, see the OPENSTEP Development Tools Reference.   ;/NextLibrary/Documentation/NextDev/Reference/DevTools/Debugger/Debugger.rtf;;¬

Setting Up the Program's Environment

Besides allowing you to choose the executable, the Launch Options panel also lets you set environment variables, pass arguments to your program, and specify other directories that contain source code for this project. 

¬

You can change environment variables and command-line arguments while your program is running in the debugger, but they won't take effect unless you restart the program. 

Running the Program Outside of the Debugger

If you want to launch the program outside of the debugger, click the Launch button instead of the Debug button. The program is started up and operates independantly, just as if you'd started it outside of Project Builder. 

¬

Related Concept:  ;DebuggingConcepts.rtfd; linkMarkername AttachingtoanAlreadyRunningProcess;,  Attaching to an Already Running Process