1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bdebugger and breakpoint

Discussion in 'Support' started by jbanaszczyk, Dec 31, 2014.

  1. jbanaszczyk

    Joined:
    Jun 8, 2013
    Messages:
    98
    Likes Received:
    0
    One more problem.

    From docs:
    and the code (xyz.btm)
    Code:
    @echo off
    GoSub something
    cancel
    
    :something
      echo Entering somewhere
      breakpoint
      echo Exiting somewhere
      return
    
    Run to breakpoint:
    F5, Shift F11.
    Breakpoint was not fired. Debugger marked line with breakpoint as "disabled" (white circle, red perimeter).

    Step into:
    F5, F11 many times. Debugger marked line with breakpoint as "disabled" just entering that line. Why disabled?

    Step over (as documented)
    F5, F10, F10
    Breakpoint was not fired. Debugger didn't marked line with breakpoint.

    In all cases output is the same:
    Code:
    Entering somewhere
    Exiting somewhere
    
    Breakpoint was not fired.

    -------------------------
    Let's mark breakpoints with mouse. Click on left margin of lines: "Breakpoint" and the next one. Breakpoints are marked with red dots.

    F5, F10, F10 - breakpoints was not fired :(

    F5, Shift F11, Shift F11, Shift F11: strange. The first breakpoint was marked as disabled, second one - no change, both breakpoints (disabled and active) are stopping execution of "Run to breakpoint"

    Happy new year
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,806
    Likes Received:
    82
    Fixed in build 71.

    Note that BREAKPOINT has been obsolete for several years; what broke it was when I added breakpoint conditions (right clicking on the breakpoint column & defining a condition). Apparently you're the only one still using BREAKPOINT? (BREAKPOINT is a holdover from the old 4DOS debugger; it's unnecessary in newer versions because the breakpoints are saved when you edit / debug files.)

    Also, there is no such thing as a breakpoint when single-stepping through code, so I'm unsure what you're expecting in that case.
     
  3. jbanaszczyk

    Joined:
    Jun 8, 2013
    Messages:
    98
    Likes Received:
    0
    Thanks for the fix.

    If breakpoint has been obsolete - please add the notice in the docs. It changes point of view :)

    I expect: if stepping using F10 (step over), if there is an active breakpoint somewhere inside the statement (inside GoSub, Do etc. ) I'm stepping over it should break.
    But: it doesn't matter if obsolete.
     
  4. ron

    ron

    Joined:
    Aug 19, 2008
    Messages:
    131
    Likes Received:
    0
    I think I'm having a similar issue. Not using "breakpoint", but having a breakpoint I set inside a gosub fire. The code is being executed but the breakpoint does not fire.

    Maybe it's because the breakpoint is inside a 'for' ?

    for %x in (""%1"") gosub age
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,806
    Likes Received:
    82
    FOR loops are handled by the parser as a single command (for CMD compatibility).

    If you want to debug a loop, use DO instead. For that matter, if you want to do anything in a loop (unless you're writing a CMD-compatible batch file) use DO instead.
     
    fromano and ron like this.
  6. ron

    ron

    Joined:
    Aug 19, 2008
    Messages:
    131
    Likes Received:
    0
    Thanks for that tip, using DO instead had not occurred to me. Just used FOR out of habit instead of need.
     

Share This Page