Results 1 to 10 of 10

Thread: Debug at startup

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Posts
    207

    Question Debug at startup

    I am migrating a VFP system to Lianja. At startup, a program sets the environment (public) variables. If I run this program in the AppBuilder after loading the App, it will run without any errors and then the App will work great. If I start this program in load () or init () custom delegate, App builder crashes while loading the App. Even if I boot with Debug, the troubleshooter won't show up before AppBuilder goes down ... please have some idea to find the bug

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,067
    I haven't tried this, and what I would suggest is that on the line in the app INIT delegate that calls your prg stick in a SET STEP ON.

    It works in JavaScript apps, but I gather this is a VFP app. If it's not a VFP app, then you know what the problem is.

    Hank

  3. #3
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,663
    Hi Strato,

    Check whether debug log files are being created in the debug directory or any error files in the error directory (below the root lianja directory).

    Regards,

    Yvonne

  4. #4
    Senior Member
    Join Date
    Oct 2012
    Posts
    207
    thanks for the suggestions. Unfortunately, no progress has been made so far. Trace does not work (Step on ineffective) the log file is empty.thanks for any further tips

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,067
    Oops, SET STEP ON is VFP, not Lianja. My bad.

    And I see what you mean: in a VFP app, I can't get the debugger to stop in the INIT when reloading the app. Interesting. What I did was stick an error in there to make it bring up the debugger. Beats me.

    In JavaScript apps, it's possible in the browser's debugger to set a breakpoint and the debugger will in fact stop where you have put it. Basically you run the page, and if you see errors, you can click on them, see the code, and put a breakpoint there. Then refresh the page and the debugger will stop right there.

    Hank

  6. #6
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,663
    Hi Strato,

    With SET DEBUGOUT ON, add some DEBUGOUT comments so that you can track where the problem is occurring.

    Regards,

    Yvonne

  7. #7
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,121
    Hi Strato,

    Show us some of your code so we can find what is wrong.
    Or upload the package (lpk) of your app so we can reproduce your problem.

    Josip

  8. #8
    Senior Member
    Join Date
    Oct 2012
    Posts
    207
    thank you for your advice and help!
    In the meantime, the Lianja Dev team has already helped find some of the bug, and it will probably soon be why it works differently in init time than after loading.
    So for now, I would close this thread.
    However, a little help using the troubleshooter would come in handy. For now, I can only trace using Watchpoint and use it step by step. The breakpoint setting does not work. Even if you toggle on the breakpoint (a green flag appears at the beginning of the line and the file name and line number below), the run will not stop. If I write something like this to the conditional breakpoint: atc ("proc", program ())> 0, the App builder will crash.

  9. #9
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,235
    Placing this command in your code under normal circumstances will activate the debugger.

    debug

    We have had no reports of breakpoints not working.

    The UI is not ready until the "ready" delegate is dispatched.
    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

  10. #10
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,067
    Hi Barry,

    Ah... I looked for what to put there. I couldn't find it in the docs, knew that I had used it.

    However, in the LAB when I put it in the INIT and READY events it doesn't fire (i.e., open up the debugger with the code). Should it? The Ready event is firing: I have a messagebox() call after the debug, and the messagebox() call fires.

    thanks,

    Hank

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