14 drracket:debug
drracket:debug:profile-interactions-text-mixin : (class? . -> . class?) |
|
Displays the error message represented by the string, adding
embellishments like those that appears in the DrRacket REPL,
specifically a clickable icon for the stack trace (if the srcloc location is not empty),
and a clickable icon for the source of the error (read & syntax errors show their source
locations and otherwise the first place in the stack trace is shown).
If stack is false, then the stack traces embedded in the exn argument (if any) are used.
Specifically, this function looks for a stacktrace via
errortrace-key in the continuation marks of exn and continuation-mark-set->context.
If stack is not false, that stack is added to the stacks already in the exception.
This should be called in the same eventspace and on the same thread as the error.
This function implements an error-display-handler in terms
of another error-display-handler.
See also Racket’s
error-display-handler
parameter.
If the current-error-port is the definitions window in
DrRacket, this error handler inserts some debugging
annotations, calls oedh, and then highlights the
source location of the runtime error.
Hides the backtrace window.
Adds the profiling preferences panel.
This function opens a DrRacket to display
debug-info. Only the src the position
and the span fields of the srcloc are considered.
The
edition-pair is used to determine if a
warning message is shown when before opening the file.
If the
edition-pair is not
#f, it is compared
with the result of
get-edition-number
of the editor that is loaded to determine if the file has been
edited since the source location was recorded. If so, it
puts up a warning dialog message to that effect.
Shows the backtrace window you get when clicking on the bug in
DrRacket’s REPL.
The error-message argument is the text of the error,
dis is the debug information, extracted from the
continuation mark in the exception record, using
errortrace-key.
The editions argument indicates the editions of any editors
that are open editing the files corresponding to the source locations
The defs argument should be non-#f if there are
possibly stacktrace frames that contain unsaved versions of the
definitions window from DrRacket. Similarly, the ints argument
should be non-#f if there are possibly stacktrace frames that contain
unsaved versions of the interactions window.
Shows the backtrace window you get when clicking on the bug in
DrRacket’s REPL.
Constructs a edition pair from a source location,
returning the current edition of the editor editing
the source location (if any).
The ints and defs arguments are used to map source locations,
in the case that the source location corresponds to the definitions
window (when it has not been saved) or the interactions window. This calls
normalize-path, so to avoid the severe performance penalty that can
incur on some filesystems, the cache argument is consulted and updated,
when it is provided. Use this argument if you’re calling
drracket:debug:srcloc->edition/pair a number of times in a loop, when you
do not expect the filesystem to change across iterations of the loop. The initial
argument should be an empty equal hash (e.g., (make-hash)).