Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

BLADE - difference in debug "single step" and "step into"?

I'm trying to map my traditional debug keystrokes from the acad VLIDE to BLADE.
F8 was "do one function"
shift-F8 is do entire statement, from start ( to end )
those two are about all I care about besides F9 which is the same in VLIDE and BLADE already (set breakpoint).
What I cannot figure out is if in BLADE, "single statement" is different from "step into".
They seem to do the exact same thing, and one should get the F8.
The other, I will simply ignore.
The step out gets the shift-F8, that is clear.
Can anyone clarify before I bug Torsten on this?


  • Dear James,

    I'm trying to explain the difference between "single step" and "step into" :-)
    "single step" is what it literally means - 1 atomic evaluation at one time ... there is never a "step into" operation triggered, it is always "eval the actual statement as one", regardless whether that is atomid "1+" or "(MyFuntion 1 2 3)" ...

    "Step Into" means, that it is attempted/tried to go "into" the function - if that is a user-defun; somewhat naturally, there is no way to "step into" into a native Lisp core function like "(1+ ...)" - but it will work for "(MyFunc 1 2 3)", under the condition, that "MyFunc" function was also loaded under debug context (if that function was loaded before debug session started, then it is handled like a native function - it is present for evaluator, but not for debugger (as loaded outside debugger).

    In fact, harder to describe, than to try :-)
    If you try "single step" and "step into" on your own "(MyFunc 1 2 3)", you will see the different behaviour ...
    I know, that VLIDE (mis)interpetes "single step" vs. "step into", in a somewhat unlogical way ... I think, BLADE's logic is at least somewhat more consistent, and essentially what the name says : single step vs. step into.

    One excepton from that rule : if there is a breakpoint inside "(MyFunc ...)" function scope, the "single step" over "(MyFunc ...)" will in fact stop at the break point, as the break point has priority.

    So you might assign different hotkeys to "single step" and "step into", and try with native "(1+ ...)" and with custom "(MyFunc ...)" functions;
    means, BLADE will give you exactl ythe behaviour as intended (once the difference to VLIDE's strange logic is clear).

    I hope, I did not destroy the last clear things ? :-)
    many greetings !

  • Hi Torsten,
    You have yet to butcher an explanation, I'm not sure you know how :)
    That makes sense, as I must have tested on simple functions so it looked the same.
    I think in the end, I want Step Into as F8 since that covers both needs.
    On simple functions, it just does the function. On nested functions, it goes in one step at a time.
    For the case where I want the entire (myfunc 1 2 3) run, I just use Step over.

    One interesting thing I just noticed that really confused me:
    One the line where you set a breakpoint, like at beginning of:
    If you hit Step over, to evaluate the whole line, it actually steps into.
    After that line, step over works fine, just line with breakpoint misbehaves.
    You might look at that as I doubt its intended.

    Anyway, I am off and lisping!

  • Dear James,

    I think I can (at least) explain :-)

    The breakpoint is in fact assigned to the LINE NUMBER, not to the first statement at that line in code ... so that breakpoint is hit multiple times for each (sub-)statement in that line, as code execution continues ... kind of known issue :-(

    But I promise to improve that, to only stop once, at first occurence, ignoring multiple subsequent hits at same file + same line, if the actual statement is at different position (column) ....
    this details sometimes annoys me as well, so good chances to get this improved in reasonable time :-)

    thanks for feedback & many greetings !

  • edited February 14

    Oh, so if I was in a loop, the "automatic" step into behavior would happen.
    That's easy to work around.
    I think the bigger thing on my list of practical issues now is I generally have two fas projects open in VLIDE.
    I use the "load files for project" button a lot.
    In BLADE, its only one project allowed, and you have to load all files to get them, including other, non project files you have open.
    Sometimes I have three projects open in vlide, as I have one for autocad startup, one for my civil tools, and one for free version of my civil tools.
    Something for the future maybe.
    At the moment though, I wish there was a "load all files for just the project open" option.

  • Dear James,

    At the moment though, I wish there was a "load all files for just the project open" option.

    when you right-click on the "project root" item,, there is "Load all Lisp files in BricsCAD" ... when under Debug, all those are then automatically "debug-enabled" (except DES files, naturally);
    I think that is what you are asking for ?

    Besides, BLADE debugger recognises if some Lisp code was not yet loaded (under Debug), and offers to load the appropriate Lisp file, if a function from that file shall be executed ... this allows to start with just 1 main Lisp file, and "dynamically" load-on-demand, whatever is needed;
    at least, useful, if not 50...100 files are to be demand-loaded, but just a few ... :-)

    many greetings !

Sign In or Register to comment.
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam