Difference between revisions of "Documentation/DevGuide/Basic/Basic Source Editor and Debugger"
m |
m |
||
Line 8: | Line 8: | ||
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}} | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}} | ||
{{DISPLAYTITLE:Basic Source Editor and Debugger}} | {{DISPLAYTITLE:Basic Source Editor and Debugger}} | ||
− | The Basic editor and debugger of the IDE window is shown when the user edits a Sub or Function from the | + | The Basic editor and debugger of the IDE window is shown when the user edits a Sub or Function from the {{menu|Tools|Macros|Organize Macros|OpenOffice Basic}} dialog. In this mode, the window contains the actual editor main window, debugger Watch window to display variable values and the debugger Calls window to display the Basic call stack. The Watch and Calls windows are only used when a Basic program is running and halted by the debugger. |
The editor supports common editor features. Since the editor is only used for the {{AOo}} Basic programming language, it supports a Basic syntax specific highlighting and {{key|F1}} help for Basic keywords. | The editor supports common editor features. Since the editor is only used for the {{AOo}} Basic programming language, it supports a Basic syntax specific highlighting and {{key|F1}} help for Basic keywords. | ||
Line 27: | Line 27: | ||
|- | |- | ||
|[[Image:StepOver.png]] | |[[Image:StepOver.png]] | ||
− | |'''Procedure Step''': Executes one Basic statement without stepping into Subs or Functions called in the statement. The execution is halted after the statement has been executed. If the Basic program not is running the execution is started and halted at the first statement of the first Sub in the current module. | + | |'''Procedure Step''': Executes one Basic statement without stepping into Subs or Functions called in the statement. The execution is halted after the statement has been executed. If the Basic program not is running, the execution is started and halted at the first statement of the first Sub in the current module. |
|- | |- | ||
|[[Image:SingleStep.png]] | |[[Image:SingleStep.png]] | ||
− | |'''Single Step''': Executes one Basic statement. If the statement contains another Sub, execution is halted at the first statement of the called Sub. If no Subs or Functions are called in the statement, this button has the same functionality as the | + | |'''Single Step''': Executes one Basic statement. If the statement contains another Sub, execution is halted at the first statement of the called Sub. If no Subs or Functions are called in the statement, this button has the same functionality as the {{button|Step over}} button (key command {{key|'''F8'''}}). |
|- | |- | ||
|[[Image:StepOut.png]] | |[[Image:StepOut.png]] | ||
− | |'''Step back''': Steps out of the current executed Sub or Function and halts at the next statement of the caller Sub or Function. If the currently executed Sub or Function was not called by another Sub or Function or if the Basic program is not running, this button has the same effect as the | + | |'''Step back''': Steps out of the current executed Sub or Function and halts at the next statement of the caller Sub or Function. If the currently executed Sub or Function was not called by another Sub or Function or if the Basic program is not running, this button has the same effect as the {{button|Run}} button. |
|- | |- | ||
|[[Image:Breakpoint.png]] | |[[Image:Breakpoint.png]] | ||
− | |'''Breakpoint''': Toggles a breakpoint at the current cursor line in the Basic editor. If a breakpoint can not be set at this line a beep warns the user and the action is ignored (key command {{key|'''F9'''}}). A breakpoint is displayed as a red dot in the left column of the editor window. | + | |'''Breakpoint''': Toggles a breakpoint at the current cursor line in the Basic editor. If a breakpoint can not be set at this line, a beep warns the user and the action is ignored (key command {{key|'''F9'''}}). A breakpoint is displayed as a red dot in the left column of the editor window. |
|- | |- | ||
|[[Image:AddWatch.png]] | |[[Image:AddWatch.png]] | ||
Line 54: | Line 54: | ||
|- | |- | ||
|[[Image:Controls.png]] | |[[Image:Controls.png]] | ||
− | |'''Controls''': Opens the dialog editing tools in the dialog editor. In Basic editor mode this button is disabled. | + | |'''Controls''': Opens the dialog editing tools in the dialog editor. In Basic editor mode, this button is disabled. |
|- | |- | ||
|[[Image:OpenBasicSource.png]] | |[[Image:OpenBasicSource.png]] | ||
Line 65: | Line 65: | ||
Illustration 12.24: Basic Editor and Debugger shows how the IDE window looks while a Basic program is executed in debugging mode. | Illustration 12.24: Basic Editor and Debugger shows how the IDE window looks while a Basic program is executed in debugging mode. | ||
− | * The | + | * The {{button|Stop}} button is enabled. |
* A breakpoint is set in line 11. | * A breakpoint is set in line 11. | ||
* The execution is halted in line 12. The current position is marked by a yellow arrow. | * The execution is halted in line 12. The current position is marked by a yellow arrow. |
Latest revision as of 12:28, 18 January 2024
- Basic Source Editor and Debugger
- Dialog Editor
The Basic editor and debugger of the IDE window is shown when the user edits a Sub or Function from the Tools → Macros → Organize Macros → OpenOffice Basic dialog. In this mode, the window contains the actual editor main window, debugger Watch window to display variable values and the debugger Calls window to display the Basic call stack. The Watch and Calls windows are only used when a Basic program is running and halted by the debugger.
The editor supports common editor features. Since the editor is only used for the Apache OpenOffice Basic programming language, it supports a Basic syntax specific highlighting and F1 help for Basic keywords.
The following list explains the functionality of the macro toolbar buttons.
Illustration 12.24: Basic Editor and Debugger shows how the IDE window looks while a Basic program is executed in debugging mode.
- The Stop button is enabled.
- A breakpoint is set in line 11.
- The execution is halted in line 12. The current position is marked by a yellow arrow.
- The Watch window contains the entries Value and Hello, and displays the current values of these variables. Values of variables can also be evaluated by touching a corresponding identifier in the source code with the cursor.
- The Calls window shows the stack. The currently executed Sub doIt is displayed at the top and the Sub Main at the second position.
Content on this page is licensed under the Public Documentation License (PDL). |