1 Implementing Dr Scheme Tools
2 Adding Languages to Dr Scheme
3 Creating New Kinds of Dr Scheme Frames
4 Extending the Existing Dr Scheme Classes
5 Expanding the User’s Program Text and Breaking
6 Editor Modes
7 Language-specific capabilities
8 drscheme: get/ extend
9 drscheme: unit
10 drscheme: language
11 drscheme: language-configuration
12 drscheme: debug
13 drscheme: rep
14 drscheme: frame
15 drscheme: help-desk
16 drscheme: eval
17 drscheme: modes
Index
On this page:
drscheme: debug: profile-unit-frame-mixin
drscheme: debug: profile-interactions-text-mixin
drscheme: debug: profile-definitions-text-mixin
drscheme: debug: error-display-handler/ stacktrace
drscheme: debug: make-debug-error-display-handler
drscheme: debug: make-debug-eval-handler
drscheme: debug: hide-backtrace-window
drscheme: debug: profiling-enabled
drscheme: debug: add-prefs-panel
drscheme: debug: open-and-highlight-in-file
drscheme: debug: show-backtrace-window
drscheme: debug: get-cm-key
Version: 4.0.2

 

12 drscheme:debug

drscheme:debug:profile-unit-frame-mixin : (class? . -> . class?)

  argument extends/implements: 

drscheme:frame:<%>

 

drscheme:unit:frame<%>

drscheme:debug:profile-interactions-text-mixin : (class? . -> . class?)

  argument extends/implements: 

drscheme:rep:text<%>

drscheme:debug:profile-definitions-text-mixin : (class? . -> . class?)

  argument extends/implements: 

drscheme:unit:definitions-text<%>

 

text%

(drscheme:debug:error-display-handler/stacktrace

 

msg

 

 

 

 

 

 

exn

 

 

 

 

 

 [

stack])

 

 

any

  msg : string?

  exn : any/c

  stack : (or/c false/c (listof srcloc?)) = #f

Displays the error message represented by the string, adding embellishments like those that appears in the DrScheme 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 trace embedded in the exn argument (if any) is used.

This should be called in the same eventspace and on the same thread as the error.

(drscheme:debug:make-debug-error-display-handler oedh)

  (-> string? (or/c any/c exn?) any)

  oedh : (-> string? (or/c any/c exn?) any)

This function implements an error-display-handler in terms of another error-display-handler.

This function is designed to work in conjunction with drscheme:debug:make-debug-eval-handler.

See also MzScheme’s error-display-handler parameter.

If the current-error-port is the definitions window in drscheme, this error handler inserts some debugging annotations, calls oedh, and then highlights the source location of the runtime error.

(drscheme:debug:make-debug-eval-handler odeh)

  (any/c . -> . any/c)

  odeh : (any/c . -> . any/c)

This function implements an eval-handler in terms of another eval-handler.

This function is designed to work in conjunction with drscheme:debug:make-debug-error-display-handler.

See also MzScheme’s eval-handler parameter.

The resulting eval-handler expands and annotates the input expression and then passes it to the input eval-handler, unless the input expression is already compiled, in which case it just hands it directly to the input eval-handler.

(drscheme:debug:hide-backtrace-window)  void?

Hides the backtrace window.

(drscheme:debug:profiling-enabled enabled?)  void?

  enabled? : boolean?

(drscheme:debug:profiling-enabled)  boolean?

A parameter that controls if profiling information is recorded.

Defaults to #f.

Only applies if drscheme:debug:make-debug-eval-handler has been added to the eval handler.

(drscheme:debug:add-prefs-panel)  void?

Adds the profiling preferences panel.

(drscheme:debug:open-and-highlight-in-file debug-info)  void?

  debug-info : srcloc?

This function opens a DrScheme to display debug-info. Only the src the position and the span fields of the srcloc are considered.

See also drscheme:debug:get-cm-key.

(drscheme:debug:show-backtrace-window

 

error-message

 

 

 

 

 

 

dis)

 

 

void?

  error-message : string?

  dis : (or/c exn? (listof srcloc?))

Shows the backtrace window you get when clicking on the bug in DrScheme’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 drscheme:debug:get-cm-key.

(drscheme:debug:get-cm-key)  any

Returns a key used with contination-mark-set->list. The contination mark set attached to an exception record for the user’s program may use this mark. If it does, each mark on the continuation is a list of the fields of a srcloc object.