Translations:KDevelop5/Manual/Debugging programs/3/en: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
 
(No difference)

Latest revision as of 08:20, 1 October 2017

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (KDevelop5/Manual/Debugging programs)
Once you have a launch configured (see [[Special:myLanguage/KDevelop5/Manual/Running programs|Running programs]]), you can also run it in a debugger: Select the menu item <menuchoice>Run -> Debug Launch</menuchoice>, or hit <keycap>F9</keycap>. If you are familiar with '''gdb''', the effect is the same as starting '''gdb''' with the executable specified in the launch configuration and then saying <code>Run</code>. This means that if the program calls <code>abort()</code> somewhere (e.g. when you run onto a failing assertion) or if there is a segmentation fault, then the debugger will stop. On the other hand, if the program runs to the end (with or without doing the right thing) then the debugger will not stop by itself before the program is finished. In the latter case, you will want to set a breakpoint on all those lines of your code base where you want the debugger to stop before you run the debug launch. You can do that by moving the cursor on such a line and selecting the menu item <menuchoice>Run -> Toggle breakpoint</menuchoice>, or right-clicking on a line and selecting <menuchoice>Toggle Breakpoint</menuchoice> from the context menu.

Once you have a launch configured (see Running programs), you can also run it in a debugger: Select the menu item Run -> Debug Launch, or hit F9. If you are familiar with gdb, the effect is the same as starting gdb with the executable specified in the launch configuration and then saying Run. This means that if the program calls abort() somewhere (e.g. when you run onto a failing assertion) or if there is a segmentation fault, then the debugger will stop. On the other hand, if the program runs to the end (with or without doing the right thing) then the debugger will not stop by itself before the program is finished. In the latter case, you will want to set a breakpoint on all those lines of your code base where you want the debugger to stop before you run the debug launch. You can do that by moving the cursor on such a line and selecting the menu item Run -> Toggle breakpoint, or right-clicking on a line and selecting Toggle Breakpoint from the context menu.