console window pops up on break loop, annoying

Discussion in 'AutoCAD' started by James Maeding, Feb 19, 2004.

  1. Every time I stop a lisp during debug with the "step out" button (the big red arrow one), two time wasting things
    happen:
    1) the console window pops up
    2) it makes the drawing window have focus

    So every time I stop a routine, I have to click on the vlisp program button on eth windows taskbar, then close the
    console window. to see the offending code.

    Is there any way to get around this?
    thanks
    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Feb 19, 2004
    #1
  2. What's (vl-bt)?
     
    Allen Johnson, Feb 19, 2004
    #2
  3. I believe vl-bt loosely translates to "Visual LISP Back Trace". It can be used
    to get a more verbose err dump than a simple (princ msg) inside a *error*
    handler provides.

    Simplified usage:

    (defun *error* ( msg )
    (vl-bt)
    (princ)
    )

    Example dump:

    If I try to call a function that's not defined ...

    (undefined_function)

    Here is the resulting sewage:

    Backtrace:
    [0.45] (VL-BT)
    [1.41] (*ERROR* "no function definition:
    UNDEFINED_FUNCTION")
    [2.36] (_call-err-hook #<SUBR @03a33e9c *ERROR*>
    "no function definition: UNDEFINED_FUNCTION")
    [3.30] (sys-error "no function definition:
    UNDEFINED_FUNCTION"):ERROR-BREAK.25 nil
    [4.22] (#<SUBR @0343258c null-fun-hk>)
    [5.19] (UNDEFINED_FUNCTION)
    [6.15] (#<SUBR @03a3c80c -rts_top->)
    [7.12] (#<SUBR @03432334 veval-str-body>
    "(undefined_function)" T #<FILE internal>)
    :CALLBACK-ENTRY.6 :)CALLBACK-ENTRY)
    :ARQ-SUBR-CALLBACK.3 (nil 0)

    I believe Tony Tanzillo was the first to shed light on this undocumented
    function. If you do a google group search you can probably find robust
    wrappered err handlers, tho I find the one above works well enough for me most
    of the time. Your mileage may vary ...
     
    michael puckett, Feb 19, 2004
    #3
  4. James Maeding

    Mark Propst Guest

    I've seen you recommend this many times,
    how on earth do you interpret the results?
    Backtrace:
    [0.19] (VL-BT)
    [1.15] (#<SUBR @047d8140 -rts_top->)
    [2.12] (#<SUBR @02012334 veval-str-body> "(VL-BT)" T #<FILE internal>)
    :CALLBACK-ENTRY.6 :)CALLBACK-ENTRY)
    :ARQ-SUBR-CALLBACK.3 (nil 0)
    nil
     
    Mark Propst, Feb 19, 2004
    #4
  5. James Maeding

    R.K. McSwain Guest

    Tile your code window and the Console so there is no overlap?
     
    R.K. McSwain, Feb 19, 2004
    #5
  6. That appears to me to be an edited error dump.

    "Mark Propst" <notmark-at-atreng-dot-com> wrote in message
    I've seen you recommend this many times,
    how on earth do you interpret the results?
    Backtrace:
    [0.19] (VL-BT)
    [1.15] (#<SUBR @047d8140 -rts_top->)
    [2.12] (#<SUBR @02012334 veval-str-body> "(VL-BT)" T #<FILE internal>)
    :CALLBACK-ENTRY.6 :)CALLBACK-ENTRY)
    :ARQ-SUBR-CALLBACK.3 (nil 0)
    nil

    <snippage>
     
    michael puckett, Feb 19, 2004
    #6
  7. James Maeding

    Mark Propst Guest

    nope, just hit esc at a lisp command just for a quick example.

    But in the past I've tried to use it after a 'real' error and still couldn't
    find anything understandable in it.
    I see in your example above the undefined function report - that's the
    clearest printout i've ever seen - as far as being intelligible to me.
    guess I have to re-investigate the technique.

    I use the vlide "send to acad function" (alt-t-s) or whatever it's called,
    where you can highlight a selection and have it run immediately in acad, or
    load file (alt-t-e), so much though that textpad just didn't seem to do
    anything for me. I know it's just a crutch i over-use cause I'm so bad at
    writing lisp I need to run everything to see if it's actually going to work.

    seems like it would be more time consuming to edit a file in textpad, save
    the file, go to acad, load the file, and then run the function compared to
    <select alt-t-s>
    and how would you interpret a snippet from a function rather than the
    function as a whole?
     
    Mark Propst, Feb 19, 2004
    #7
  8. I will apologize in advance by saying I cannot provide you the expressive
    answer you deserve because I don't have the time.

    However, I will briefly say that a coding style that is more modular (as
    opposed to the monolithic approach) tends to not only make it easy to manage
    (and re-use) a large code base, but easy(ier) to track errors if, and when
    they occur, as the function calls are part of the dump. If you have a
    functions that are hundreds of lines of code and "all encompassing" you will
    have a harder time tracking the errors, as opposed to functions that do
    precisely one thing in a reasonable amount of logic.

    As for editing in Textpad, loading in AutoCAD and then running -- it is not a
    big deal, time consuming, or even annoying. It's just the way I have done it
    for years. I've never liked the vlide, I liked Textpad from the get go, even
    tho I tried MultiEdit, UltraEdit, Boxer, Zeus, Edlin, yada, bla, bonk ...

    Anyway, off I go ...

    "Mark Propst" <notmark-at-atreng-dot-com> wrote in message

    nope, just hit esc at a lisp command just for a quick example.

    But in the past I've tried to use it after a 'real' error and still couldn't
    find anything understandable in it.
    I see in your example above the undefined function report - that's the
    clearest printout i've ever seen - as far as being intelligible to me.
    guess I have to re-investigate the technique.

    I use the vlide "send to acad function" (alt-t-s) or whatever it's called,
    where you can highlight a selection and have it run immediately in acad, or
    load file (alt-t-e), so much though that textpad just didn't seem to do
    anything for me. I know it's just a crutch i over-use cause I'm so bad at
    writing lisp I need to run everything to see if it's actually going to work.

    seems like it would be more time consuming to edit a file in textpad, save
    the file, go to acad, load the file, and then run the function compared to
    <select alt-t-s>
    and how would you interpret a snippet from a function rather than the
    function as a whole?
     
    michael puckett, Feb 19, 2004
    #8
  9. James Maeding

    David Kozina Guest

    Alls I can say about 'other code editors' is that when you write code as
    mixed up and disorganized as I do, a 'folding text editor', like ScopeEdit
    or Interspector can simply do wonders to help find common code patterns or
    otherwise get things at least a little better in shape. (Thanks, Michael)

    It seems that the more I do, the more I am appalled by my own code.
    Egads! <sigh> :-/
     
    David Kozina, Feb 19, 2004
    #9
  10. James Maeding

    Mark Propst Guest

    interesting...what's a 'folding text editor'?
     
    Mark Propst, Feb 20, 2004
    #10
  11. James Maeding

    David Kozina Guest

    A screenshot example (of HTML coding) can be found here:

    http://loginov.com/products/interspector/

    You can also obtain a fully function 30-day trial version, there, too.

    I posted some additional screenshot examples (of the older but similiar
    ScopeEdit utility) in this newsgroup on 12/21/2003. (I've since upgraded
    ScopeEdit to Interspector and have found the newer program even nicer - MUCH
    better syntax colorization capabilities than its predecessor.)

    The main idea being the explorer-like 'tree' pane, wherein code can be
    'folded up' or 'nested' to deeper levels quickly and easily, so that you can
    (truly) follow the logic flow of your program more easily. All I can say is
    that the ability to pop back and forth and in and out and deeper and higher
    over multiple files via the 'tree' becomes *very* addictive... :)

    Text folding appears to be rather high on the list of desired capabilities
    for TextPad users, too, btw, so don't count out such capability there some
    day, either. (I like TextPad very much, too.)

    Feel free to e-mail me for more info on Interspector, if you'd like...

    hth,
    David Kozina
     
    David Kozina, Feb 20, 2004
    #11
  12. Have you tried LispLink V 16.01 by CAELink Corp? For its low price (Yeah - I
    know its not free. But its well worth the price for a serious VLisp
    programmer!) It has Awesome tools for Visual Lisp programming, such as
    Localizing variables, configurable pretty printer, a function browser,
    syntax checking, user defined keywords, test loading lsp and dcl files,
    context sensitive keyword help, and linking to the vlide compiler, and allot
    more! This is definitely THE BEST autolisp/Vlisp editor in existence IMHO.

    http://www.caelink.com/lisplink.htm
     
    Phil Kenewell, Feb 20, 2004
    #12
  13. I will try the lisplink. I have wanted an edtor that could localize variables (a constant source of error) and also do
    debugging and syntax highlighting. For $30, I'll have it around just for the var localizing, what a deal.

    The tileing idea is not really practical, I don't think the vlisp folks realized what they were doing with the console
    popup thing.
    Thanks though
    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Feb 23, 2004
    #13
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.