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

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

Latest revision as of 08:18, 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.

Після того, як запуск програми буде налаштовано (див. Запуск програм), ви зможете запускати програму під керуванням інструмента зневаджування: скористайтеся пунктом меню Виконання -> Зневаджувальний запуск або натисніть клавішу F9. Якщо ви знайомі з роботою gdb, результат буде той самий, що і після запуску gdb з вказаним виконуваним файлом у налаштуваннях запуску з наступною командою Run. Це означає, що якщо програмою буде десь викликано abort() (наприклад, якщо оператором контролю буде виявлено помилку) або якщо буде виявлено помилку сегментування, інструмент зневаджування зупинить роботу програми. З іншого боку, якщо програма зможе виконати роботу до кінця (правильно чи неправильно), інструмент зневаджування не зупинятиме її роботу, аж доки ця робота не завершиться сама. У такому разі вам можуть знадобитися встановлені ще до запуску програми точки зупину у всіх рядках коду, де інструмент зневаджування має зупиняти роботу програми. Встановити такі точки зупину можна встановленням курсора у відповідному рядку з наступним вибором пункту меню Виконання -> Встановити/зняти точку зупину або використанням пункту контекстного меню (викликається клацанням правою кнопкою миші) Встановити/зняти точку зупину.