KDevelop5/Manual/Running programs/uk: Difference between revisions

    From KDE UserBase Wiki
    (Importing a new version from external source)
    (Importing a new version from external source)
    Line 13: Line 13:
    [[Image:kdevelop-3.png|thumb|650px|center]]
    [[Image:kdevelop-3.png|thumb|650px|center]]


    You can now try to run the program: Select <menuchoice>Run -> Execute Launch</menuchoice> from '''KDevelop's''' main window menu (or hit <keycap>Shift + F9</keycap>) and your program should run in a separate subwindow of '''KDevelop'''. The picture above shows the result: The new <menuchoice>Run</menuchoice> tool subwindow at the bottom shows the output of the program that is being run, in this case of the '''''step-32''''' program.
    Тепер можна спробувати запустити програму: скористайтеся пунктом меню головного вікна '''KDevelop''' <menuchoice>Виконання -> Виконати запуск</menuchoice> (або натисніть комбінацію клавіш <keycap>Shift+F9</keycap>) і вашу програму буде запущено у окремому підвікні '''KDevelop'''. На наведеному вище знімку показано результат: нове підвікно <menuchoice>Виконання</menuchoice>, у якому можна бачити результати роботи запущеної програми, у нашому прикладі '''''step-32'''''.


    {{Note|1= If you have configured multiple launches, you can choose which one should run when you hit <keycap>Shift + F9</keycap> by going to <menuchoice>Run -> Current Launch Configuration</menuchoice>. Unfortunately, by default, all launches are named ''New Native Application'' without an ''obvious'' possibility of renaming them, making it difficult to distinguish them when selecting the current launch configuration (see [https://bugs.kde.org/show_bug.cgi?id=272300 KDevelop bug 272300]). There is a non-obvious way to edit the name of a configuration, however: in the dialog box you get when you select <menuchoice>Run -> Current Launch Configuration</menuchoice>, double-click on the name of the configuration in the tree view on the left, which will allow you to edit the configuration's name.}}
    {{Note|1= If you have configured multiple launches, you can choose which one should run when you hit <keycap>Shift + F9</keycap> by going to <menuchoice>Run -> Current Launch Configuration</menuchoice>. Unfortunately, by default, all launches are named ''New Native Application'' without an ''obvious'' possibility of renaming them, making it difficult to distinguish them when selecting the current launch configuration (see [https://bugs.kde.org/show_bug.cgi?id=272300 KDevelop bug 272300]). There is a non-obvious way to edit the name of a configuration, however: in the dialog box you get when you select <menuchoice>Run -> Current Launch Configuration</menuchoice>, double-click on the name of the configuration in the tree view on the left, which will allow you to edit the configuration's name.}}

    Revision as of 08:13, 1 October 2017

    Other languages:

    Запуск програм у KDevelop

    Після збирання програми її слід запустити. Щоб зробити це, вам слід налаштувати інструменти запуску для ваших проектів. Інструмент запуску складається з назви виконуваного файла, набору параметрів командного рядка та середовища виконання (наприклад, «запустити програму у командній оболонці» або «запустити цю програму за допомогою інструменту для усування вад»).

    Налаштування запуску у KDevelop

    Щоб налаштувати інструменти запуску, скористайтеся пунктом меню Виконання -> Налаштувати запуски, позначте у списку проект, до якого ви хочете додати інструмент запуску і натисніть . Потім введіть назву виконуваного файла і адресу каталогу, з якого має бути запущено програму. Якщо запуск виконуваного файла залежить від результату збирання виконуваного файла і/або інших бібліотек, ви можете додати їх назви до списку, розташованого у нижній частині вікна: виберіть пункт Зібрати зі спадного меню, потім натисніть кнопку праворуч від поля для введення тексту і виберіть ціль для збирання. У нашому прикладі вибрано ціль все з проекту 1.deal.II і step-32 з проекту 1.step-32 з метою забезпечити одночасне збирання основної бібліотеки та програми на її основі до запуску програми. За допомогою цього ж діалогового вікна можна налаштувати зневаджування під час запуску: натисніть пункт Зневаджування і додайте назву виконуваного файла зневадника. Якщо цим зневадником є типовий зневадник системи (наприклад, gdb у Linux), вам не доведеться нічого додатково визначати.

    Тепер можна спробувати запустити програму: скористайтеся пунктом меню головного вікна KDevelop Виконання -> Виконати запуск (або натисніть комбінацію клавіш Shift+F9) і вашу програму буде запущено у окремому підвікні KDevelop. На наведеному вище знімку показано результат: нове підвікно Виконання, у якому можна бачити результати роботи запущеної програми, у нашому прикладі step-32.

    Note

    If you have configured multiple launches, you can choose which one should run when you hit Shift + F9 by going to Run -> Current Launch Configuration. Unfortunately, by default, all launches are named New Native Application without an obvious possibility of renaming them, making it difficult to distinguish them when selecting the current launch configuration (see KDevelop bug 272300). There is a non-obvious way to edit the name of a configuration, however: in the dialog box you get when you select Run -> Current Launch Configuration, double-click on the name of the configuration in the tree view on the left, which will allow you to edit the configuration's name.


    Some useful keyboard shortcuts

    Running a program
    F8 Build (call make)
    Shift + F9 Run
    F9 Run program in the debugger; you may want to set breakpoints beforehand, for example by right-clicking with the mouse on a particular line in the source code