Lianja 9.5 includes the ability to debug standalone Apps at runtime.
Starting the debugger
Code:
oForm.createObject("form")
oForm.requireslogin = 1
oForm.debug()
The Lianja Standalone App Debugger will be displayed next to your form.
Suspending execution in your code
The Standalone App Debugger will be displayed and a stack trace shown in the "Output" panel. Click the "Run" button in the "Input" title bar will resume execution.
You can inspect variables and objects by typing in the "Input" panel e.g
The result will be output in the "Output" panel.
Inspecting errors
If the debugger is active any errors that occur will cause the app to suspend execution and the debugger will be shown. You can then inspect your variables and/or cursors to determine the cause of the error. Resuming from an error will quit the app.
debugging your code
You can place debugout statements at points in your code. These will be displayed in the debugger "Output" panel if it is active.
Code:
thisform.debug()
set debugout on // normally you would do this in setup.prg
debugout "Performing calculations"
// do something that takes a while
debugout "Calculations completed"
Inspecting cursors and data
Use the LIST STRUCTURE, LIST STATUS and DISPLAY commands to inspect the state of your data cursors in the debugger.
Bookmarks