Debug Tab

From Lianjapedia
Revision as of 10:15, 18 January 2018 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Under Construction

The App Inspector

The App Inspector is your best friend during development as it provides a complete overview of your App.

It is organized into Tabs. Each Tab is relevant to a particular workspace. You can double click a Tab to detach it into its own floating window.

Clicking the small icon on the far right of the App Inspector title bar will detach it into its own floating window.

Double clicking the window title bar when it is floating will attach it back into place.

App Inspector


The Debug Tab

The Debug Tab contains the Lianja/VFP Debugger. The tabbed upper container contains an Output panel and the files currently loaded in the Debugger. The lower tabbed container contains the following:

  • Command Window
  • Breakpoints Grid
  • Watches Grid
  • Call Stack Grid
  • Errors Window
  • Log Window

Below these are a message line showing the current operation and an actionbar.

Activating the Debugger

As with all App Inspector tabs, the Debug Tab can be selected by clicking on its tab and double-clicking on the tab undocks it into its own floating window.

It can also be opened in the following ways:

Loading Files in the Debugger

Programs containing the debugger command or specified with the debug <prg-filename> or debugger <prg-filename> commands are automatically loaded into the debugger when the command is issued.

Programs can also be loaded from the Apps Workspace. Open the file (double-click the filename) in the Script Editor then click the Open file in Debugger toolbutton.

Open file in Debugger


Library files can be loaded from the Library Workspace in the same way: open the file (double-click the filename) in the Script Editor then click the Open file in Debugger toolbutton.

Select the Debug Tab or click Debug in the Modebar to debug the file.

Called programs are automatically loaded when referenced by a program being debugged and Step Into is clicked.

Output

The Output panel displays program and Command Window output.

Debug Tab


Command

The Debug Console contains a Lianja/VFP Command Window. All Lianja/VFP commands and functions can be used in the Command Window apart from flow control and looping commands and others that form a begin...end statement block.

Note also, as in the floating Command Window and Console Workspace and Console Tab:

  • The semi-colon ';' line continuation character is not supported.
  • & macro substitution is not supported

Output is displayed in the Output panel; errors are reported in the Console Tab.

Breakpoints

Breakpoints cause execution of the running program to pause before the line of code set as a breakpoint is run. Breakpoints can be set and unset using the actionbar or by clicking in the line number column to the left of the selected line.

Debug Tab


Click Remove All Breakpoints in the actionbar to clear all current breakpoints.

Debug Tab


Watches

Call Stack

Errors

Log

Actionbar

Action Description
Run/Continue Run or continue running the program to the next breakpoint or watch point or to the end if no breakpoints or watch points are set.
Stop Stop debugging.
Edit Code Put the currently selected file into edit mode.
Save Code Displayed when edit mode (Edit Code above) has been selected. Click to save any changes and exit edit mode.
Revert Code Displayed when edit mode (Edit Code above) has been selected. Click to cancel any changes and exit edit mode.
Refresh all files Refresh all files in the debugger. This will update them with any changes made using the Script Editor in the Apps Workspace or Library Workspace.
Step Over Move to the next line of code without running the current line.
Step Into Run the current line of code then move to the next line.
Step Out Run until returning to the calling program, then move to the next line.
Toggle Breakpoint Set a breakpoint on the current line, or unset the breakpoint if one already exists.
Toggle Watch Set a watch point on the currently selected variable, or unset the watch point if one already exists.
Remove All Breakpoints Remove all breakpoints.
Remove All Watches Remove all watch points.
List Status Lists the current data environment in the Output window.
List Memory Lists the current memory variables in the Output window.
List Structure Lists the structure of the currently selected table or cursor in the Output window.

Dock Tab

To dock the tab back in the App Inspector, click the [x] or double-click the window title bar.

Debug Tab


See Also

Error Handling and Debugging