Results 1 to 1 of 1

Thread: Lianja 9.5 Standalone App Debugger

  1. #1
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22

    Lianja 9.5 Standalone App Debugger

    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.

    Click image for larger version. 

Name:	Screen Shot 2024-03-26 at 10.53.14 AM.jpg 
Views:	796 
Size:	37.9 KB 
ID:	3130


    Suspending execution in your code

    Code:
    thisform.suspend()
    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.

    Click image for larger version. 

Name:	Screen Shot 2024-03-26 at 10.54.45 AM.jpg 
Views:	819 
Size:	67.7 KB 
ID:	3131

    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.
    Last edited by barrymavin; 2024-03-26 at 00:46.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us