mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00

All .htm files have changed for Copyright notice change. New search docs (including indexer), new screen caps.
83 lines
No EOL
3.3 KiB
HTML
83 lines
No EOL
3.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
|
|
<meta name="ProgId" content="FrontPage.Editor.Document">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>Debugging a program</title>
|
|
<link rel="stylesheet" type="text/css" href="../help.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Debugging a program</h1>
|
|
|
|
<p>You must create a debug launch configuration the first time you debug your
|
|
program.</p>
|
|
|
|
<p>To create a debug configuration:</p>
|
|
|
|
<ol>
|
|
<li>In C/C++ Projects view, select a project.
|
|
</li>
|
|
<li>Click <b>Run > Debug</b>.</li>
|
|
<li>In the Debug dialog box, select a debug configuration type from the <b>Configurations</b>
|
|
list.</li>
|
|
<li><p>Click <b>New</b>.</p></li>
|
|
<li>In the <b>Name</b> box, type a descriptive name for this debug configuration.</li>
|
|
<li>In the <b>Project</b> box, type the name of the project containing
|
|
the application you want to debug.</li>
|
|
<li>In the <b>C/C++ Application</b> box, type the name of the executable
|
|
that you want to run.</li>
|
|
<li>Click the <b>Debugger</b> tab.</li>
|
|
<li>Select <b>Run program in debugger</b>.</li>
|
|
<li>Select the <b>Stop at main() on startup</b> checkbox.</li>
|
|
<li>Click <b>Debug</b>.</li>
|
|
<p>The debug perspective is opened and the application window opens on
|
|
top. The C/C++ editor window is repositioned in the perspective.</p>
|
|
</ol>
|
|
|
|
<p>For more information:</p>
|
|
<ul><li>To specify the
|
|
execution arguments an application uses and the working directory for a run
|
|
configuration, see <a href="cdt_t_run_arg.htm">Specifying execution arguments</a>.</li><li>To set the environment variables
|
|
and values to use when an application runs, see <a href="cdt_t_run_env.htm">
|
|
Setting environment variables</a></li>
|
|
<li>To select a debugger to use when debugging an application, see
|
|
<a href="cdt_t_run_dbg.htm">Selecting a debugger</a></li>
|
|
<li>To specify the location of source files used when debugging a C or C++
|
|
application, see <a href="cdt_t_run_source.htm">Specifying the location of
|
|
source files</a></li>
|
|
<li>To specify where the run configuration is stored, how you access it and
|
|
what perspective to open when running an application, see
|
|
<a href="cdt_t_run_com.htm">Specifying the location of the run configuration</a></li></ul>
|
|
|
|
<p>To use a debug configuration:</p>
|
|
|
|
<p>You can reuse a previously created debug launch configuration to debug your
|
|
program.</p>
|
|
|
|
<ol>
|
|
<li>Click <b>Run > Debug</b>.</li>
|
|
<li>In the Debug dialog box, select a debug configuration from the Configurations
|
|
list.</li>
|
|
<li>Click <b>Debug</b>. </li>
|
|
</ol>
|
|
|
|
<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
|
|
<br>
|
|
<a href="../concepts/cdt_c_over_dbg.htm">Debug overview</a><br>
|
|
<a href="../concepts/cdt_c_dbg_info.htm">Debug information</a></p>
|
|
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
|
|
<br>
|
|
<a href="cdt_o_debug.htm">Debugging</a></p>
|
|
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
|
|
<br>
|
|
<a href="../reference/cdt_o_run_dbg_pages.htm">Run and Debug dialog box</a></p>
|
|
<img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
|
|
|
|
</body>
|
|
|
|
</html> |