How to use MiniDebugger

Tagged:  •  

First you need to load MiniDebugger in your image.


gst -K examples/MiniDebugger.st -S

You may have to sudo it.

su -c 'gst -K examples/MiniDebugger.st -S'

This will save the image with MiniDebugger loaded.
Next time you encounter a exception the MiniDebugger will prompt.

You can type help for more info:

[mathk@mathk examples]$ gst
GNU Smalltalk ready

st> self halt
'nil error: halt encountered'
Halt(Exception)>>signal (ExcHandling.st:254)
Halt(Exception)>>signal: (ExcHandling.st:264)
UndefinedObject(Object)>>halt: (SysExcept.st:1423)
UndefinedObject(Object)>>halt (Object.st:1325)
UndefinedObject>>executeStatements (a String:1)
      6         ^self activateHandler: (onDoBlock isNil and: [ self isResumable ])
(debug) help
Control flow commands:
    s [n]      step N times
    n [n]      next (step over send) N times
    f [n]      finish current method N times
    c          continue

Process commands: no ID means debugged process
    P          show process list
    T [id]...  terminate process
    K [id]...  kill process - no unwinds or cleanup
    b [id]...  backtrace

Examining state:
    r          print receiver on stdout
    i          inspect (enter MiniInspector on current receiver)
    I          inspect context (enter MiniInspector on current context)
    e          eval (enter read-eval-print loop on current receiver)

Examining the call stack:
    u [n]      go N frames up (default 1)
    d [n]      go N frames down (default 1)
    l          print current method
    w          print current frame

Other commands:
    g          collect all garbage
    X          exit Smalltalk, and dump core
    x          exit Smalltalk
(debug)

User login