<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="topic" style="task" id="debug-run" xml:lang="sv">

  <info xmlns:facet="http://projectmallard.org/facet/1.0/">
    <facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
    <link type="guide" xref="index#anjuta-debug" group="second"/>
    <link type="seealso" xref="run-parameters-dialog"/>
    <link type="seealso" xref="autotools-build-configure"/>
    <revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
    <desc>Starta ett program med felsökaren.</desc>
    <credit type="author">
      <name>Sébastien Granjoux</name>
      <email>seb.sfo@free.fr</email>
    </credit>
    <credit type="editor">
      <name>Philip Chimento</name>
      <email>philip.chimento@gmail.com</email>
    </credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Daniel Nylander</mal:name>
      <mal:email>po@danielnylander.se</mal:email>
      <mal:years>2007</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Anders Jonsson</mal:name>
      <mal:email>anders.jonsson@norsjovallen.se</mal:email>
      <mal:years>2017</mal:years>
    </mal:credit>
  </info>

  <title>Debug a program</title>
  
  <section>
    <title>Starta ett program i felsökaren</title>

    <p>The current program is defined in the <gui>Program Parameters</gui> dialog.
    See <link xref="run-parameters-dialog"/> for more information. This
    program can be started in the debugger like this:</p>

    <steps>
      <item>
        <p>From the <gui>main menu</gui>, select <guiseq><gui>Run</gui>
        <gui>Debug Program</gui></guiseq> or press <keyseq><key>Shift</key><key>F12</key></keyseq></p>
      </item>
    </steps>

    <note style="tip">
      <p>A program can be more difficult to debug if it is highly optimized
      or if debugging information is missing. Whether optimization and debugging
      information are enabled, is defined in the configure step.
      Normally, there is a Debug configuration available, that turns off optimization
      and includes all debugging information. Anjuta displays a warning
      if this configuration is not used.
      See <link xref="autotools-build-configure"/> for more information.</p>
    </note>
   </section>

  <section>
    <title>Debug an already running application</title>

    <p>The debugger can be used on an already running application.</p>

    <steps>
      <item>
        <p>From the <gui>main menu</gui>, select <guiseq><gui>Run</gui>
        <gui>Debug Process...</gui></guiseq>
        to get a dialog listing all currently running processes.</p>
      </item>
      <item>
        <p>Select a process in the <gui>Attach to process</gui> dialog
        and click on <gui>Attach</gui> to start the debugger on this
        process. See <link xref="debug-process-dialog"/> for more details.</p>
      </item>
    </steps>
  </section>
 
  <section>
    <title>Felsök ett fjärrprogram</title>

    <p>The debugger can be used to debug an application running on another
    computer connected through a TCP or serial connection.</p>

    <steps>
      <item>
        <p>From the <gui>main menu</gui>, select <guiseq><gui>Run</gui>
        <gui>Debug Remote...</gui></guiseq></p>
      </item>
      <item>
        <p>Select the type of the connection to the remote application,
	<gui>Serial Line Connection</gui> or <gui>TCP/IP Connection</gui>.</p>
      </item>
      <item>
        <p>For a TCP connection, fill in the <gui>Address</gui> and <gui>Port</gui>
        fields.</p>
        <p>For a serial connection, fill in the text box below with the serial
        device name, for example <cmd>/dev/ttyb</cmd>.</p>
      </item>
      <item>
        <p>Click on <gui>Connect</gui> to start the debugger and connect to
        the remote target.</p>
      </item>
    </steps>

  </section>

  <section>
    <title>Stoppa felsökaren</title>

    <p>Felsökaren och programmet kan stoppas när som helst på detta vis:</p>

    <steps>
      <item>
        <p>From the <gui>main menu</gui>, select <guiseq><gui>Run</gui>
        <gui>Stop Debugger</gui></guiseq>.</p>
      </item>
    </steps>

  </section>
</page>
