Shop OBEX P1 Docs P2 Docs Learn Events
Question about Debug command — Parallax Forums

Question about Debug command

Lee HarkerLee Harker Posts: 104
edited 2005-11-23 15:46 in BASIC Stamp
This is probably a simple question but it's one I haven't encountered before. Does the debug window open when it hits the Debug command in your program or does it open anytime there is a Debug command anywhere in the program. I'm having some trouble with a program and I was expecting the debug not to open if the program hadn't reached the command but maybe I was wrong. Thanks.

Lee Harker

Comments

  • NewzedNewzed Posts: 2,503
    edited 2005-11-23 15:18
    If you want the debug window to open automatically when you load the program, the best way is to write:

    debug cr

    as the first line of yiur program.· Since I like to control when my programs start I usually write the following at the very beginning of my programs:

    debug "Press any key to start", cr
    debugin com

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • aliniousalinious Posts: 51
    edited 2005-11-23 15:20
    Lee,

    When you compile and run your program, the Basic Stamp IDE automatically opens the debug window for you since it "sees" that the DEBUG command is used somewhere within the program. Here is another example, download a program which uses the DEBUG command, then shutoff the Stamp and close the debug window. Turn the Stamp back on and you will find that the debug window does not automatically open. You have to manually open the debug window yourself and select the COM port the Stamp is connected to.

    Alan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "I learn when I succeed, but I learn more when I fail."
  • Lee HarkerLee Harker Posts: 104
    edited 2005-11-23 15:46
    Alan,
    Thanks for the confirmation. I suspected that's what happens but I needed a second opinion.

    Lee
Sign In or Register to comment.