KDevelop5/Manual/Running programs/da: 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.
Nu kan du prøve at køre programmet: Vælg menuen <menuchoice>Kør -> Start</menuchoice> (eller tast <keycap>Shift + F9</keycap>), så skulle dit program starte i sit egen undervindue i '''KDevelop'''. Billedet ovenfor viser resultatet viser resultatet: Den nye værktøjsvisning <menuchoice>Kør</menuchoice> for neden viser output fra det program, som køres &mdash; i dette tilfælde programmet '''''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:

Kør programmer i KDevelop

Efter at du har bygget et program, så vil du nok køre det. For at kunne gøre dette skal du konfigurere opstarteren for dit projekt. En opstart består af et navn på et program, nogle kommandolinjeparametre og et kørselsmiljø (så som "kør dette program i en skal" eller "kør dette program i fejlsøgeren").

Opsætning af opstarteren i KDevelop

For at konfigurere opstarteren vælger du menuen Kør -> Indstil opstarter..., fremhæver det projekt, som du vil tilføje en opstarter for og klikker på knappen . Skriv så navnet på den kørbare fil og stien til arbejdsmappen. Hvis kørsel af programmet afhænger af, at den kørbare file eller et bibliotek er blevet bygget først, så er det en god ide at føje dem til listen nederst i dialogen: Vælg Byg fra dropnedmenuen, klik på knappen og vælg det mål, som skal bygges. I eksemplet ovenfor har jeg valgt målet all fra projektet 1.deal.II og step-32 fra projektet 1.step-32 for at sikre mig, at både basisbiblioteket og programmet er blevet kompileret og er up to date før, før programmet faktisk køres. Mens du er her kan du lige så godt også konfigurere en fejlsøgningsopstart ved at klikke på Fejlsøgning og tilføje navnet på fejlsøgeren; hvis det er systemets standardfejlsøger (fx gdb på Linux), så behøver du ikke at gennemføre dette skridt.

Nu kan du prøve at køre programmet: Vælg menuen Kør -> Start (eller tast Shift + F9), så skulle dit program starte i sit egen undervindue i KDevelop. Billedet ovenfor viser resultatet viser resultatet: Den nye værktøjsvisning Kør for neden viser output fra det program, som køres — i dette tilfælde programmet 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