Ask a questionAsk a question
 

QuestionDebug issue

  • Thursday, November 05, 2009 4:38 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had a break point in a form,
    set step on, run the exe.
    debug window pops up, I can watch certain values,
    But I'm unable to see the command window.
    I wish to switch to the command window so that i can test some variable changes or view different table, cursors.
    How can I make the command window visible?

    Thanks in advance.

All Replies

  • Thursday, November 05, 2009 6:32 PMCetinBasozMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In exe set step is ignored, no?

    Debug in IDE.
  • Thursday, November 05, 2009 6:36 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    SET STEP ON works in both prgs or forms. The command window simply not available.
    I can open another VFP to view the changes in data, but not variables.
    What is "Debug in IDE"?

    Thanks.
  • Thursday, November 05, 2009 6:38 PMVladimir Zografski Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try with
    SET ASSERTS ON
    and
    ASSERT .f.
    Systems Analyst
  • Thursday, November 05, 2009 7:01 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Get an error while put these 2 lines in main.prg

    "Assertion failure on line ..... of procedure main."
  • Thursday, November 05, 2009 7:17 PMVladimir Zografski Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In VFP
    View=>Toolbars check "debugger"

    Put This command in your Main.prg
    SET ASSERTS ON

    Put this command in your form.method where you want to debug
    ASSERT .f.

    On Messagebox "Assertion failure on line ..... " click on "debug" and open "Trace window" and 'Watch window" from debugger toolbar.

    Systems Analyst
  • Thursday, November 05, 2009 8:18 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    It works like my set step on command.
    The command window still does not show up. Thanks again.
  • Thursday, November 05, 2009 11:09 PMCetinBasozMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    SET STEP ON works in both prgs or forms. The command window simply not available.
    I can open another VFP to view the changes in data, but not variables.
    What is "Debug in IDE"?

    Thanks.
    I didn't say it wouldn't work for prgs or forms. It would work there and more like classes, menus ... What I am saying "set step on" is ignored in an executable and you are saying exe. Which version of VFP are you using that lets you to step code from an exe.

    IDE is Integrated Development Environment. That is where you develop applications, write code, debug etc (the place when you launch VFP). You would simply use IDE to debug your code and set _screen.visible to .t. if it is not already. Once you get to debugger  you can go to command window from menu or Ctrl+F2.
  • Monday, November 09, 2009 7:52 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Sorry, I might mispresent the situation.

    In Main.prg

    _Screen.Visible=.t.

    Run the application from the command window by

    Set step on
    locate the exe file and click it to open.

    This still did not bring up the command window if pressing Ctrl+ F2

  • Tuesday, November 10, 2009 8:45 PMCetinBasozMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hmm I never thought to stepping over an exe run from command window. Why don't you instead run the 'main.prg' instead of exe so you could easily step + go to command window etc. 
  • Wednesday, November 11, 2009 7:55 PMLightening Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You are right. I should run the main.prg instead of exe. I didn't do so because I kept on hitting errors as some procedures called interfered with some new objects programatically created.