/usr/share/doc/racket/reference/debugging.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>18.5 Debugging</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewselflink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1 </td><td><a href="running-sa.html" class="tocviewlink" data-pltdoc="x">Running Racket or GRacket</a></td></tr><tr><td align="right">18.2 </td><td><a href="collects.html" class="tocviewlink" data-pltdoc="x">Libraries and Collections</a></td></tr><tr><td align="right">18.3 </td><td><a href="Interactive_Help.html" class="tocviewlink" data-pltdoc="x">Interactive Help</a></td></tr><tr><td align="right">18.4 </td><td><a href="interactive.html" class="tocviewlink" data-pltdoc="x">Interactive Module Loading</a></td></tr><tr><td align="right">18.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Debugging</a></td></tr><tr><td align="right">18.6 </td><td><a href="Kernel_Forms_and_Functions.html" class="tocviewlink" data-pltdoc="x">Kernel Forms and Functions</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>18.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Debugging</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.5.1 </td><td><a href="#%28part._.Tracing%29" class="tocviewlink" data-pltdoc="x">Tracing</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">18.5.1<tt> </tt></span><a href="#%28part._.Tracing%29" class="tocsubseclink" data-pltdoc="x">Tracing</a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">trace</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._untrace%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">untrace</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-notify%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>trace-<wbr></wbr>notify</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._trace-call%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">trace-<wbr></wbr>call</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-args%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>trace-<wbr></wbr>print-<wbr></wbr>args</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-results%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>trace-<wbr></wbr>print-<wbr></wbr>results</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-in%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>prefix-<wbr></wbr>in</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-out%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>prefix-<wbr></wbr>out</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="interactive.html" title="backward to "18.4 Interactive Module Loading"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="Kernel_Forms_and_Functions.html" title="forward to "18.6 Kernel Forms and Functions"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""debugging"">18.5<tt> </tt><a name="(part._debugging)"></a>Debugging</h4><p>Racket’s built-in debugging support is limited to context (i.e.,
“stack trace”) information that is printed with an exception. In
some cases, disabling the <a href="eval.html#%28tech._jit%29" class="techoutside" data-pltdoc="x"><span class="techinside">JIT</span></a> compiler can affect context
information. The <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=errortrace&rel=using-errortrace.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">errortrace</span></a> library supports more
consistent (independent of the <a href="eval.html#%28tech._jit%29" class="techoutside" data-pltdoc="x"><span class="techinside">JIT</span></a> compiler) and precise context
information. The <a href="#%28mod-path._racket%2Ftrace%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/trace</span></a> library provides simple
tracing support. Finally, the <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?tag=%28part._%28.%27%28lib._scribblings%2Fdrracket%2Fdrracket..scrbl%29.%27._.%27top.%27%29%29&version=6.1" class="Sq" data-pltdoc="x">DrRacket</a> programming environment
provides much more debugging support.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Tracing"">18.5.1<tt> </tt><a name="(part._.Tracing)"></a><a name="(mod-path._racket/trace)"></a>Tracing</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Ftrace%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/trace</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="#%28mod-path._racket%2Ftrace%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/trace</span></a> library, not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> or <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>.</div></p><p>The <a href="#%28mod-path._racket%2Ftrace%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/trace</span></a> library mimics the tracing facility
available in Chez Scheme.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/trace..rkt)._trace))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">trace</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Each <span class="RktVar">id</span> must be bound to a procedure in the environment of
the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span> expression. Each <span class="RktVar">id</span> is <span class="RktSym"><a href="set_.html#%28form._%28%28quote._~23~25kernel%29._set%21%29%29" class="RktStxLink" data-pltdoc="x">set!</a></span>ed to
a new procedure that traces procedure calls and returns by printing
the arguments and results of the call via
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-notify%29%29" class="RktValLink" data-pltdoc="x">current-trace-notify</a></span>. If multiple values are returned, each
value is displayed starting on a separate line.</div></p><p>When traced procedures invoke each other, nested invocations are shown
by printing a nesting prefix. If the nesting depth grows to ten and
beyond, a number is printed to show the actual nesting depth.</p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span> form can be used on an identifier that is already
traced. In this case, assuming that the variable’s value has not been
changed, <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span> has no effect. If the variable has been
changed to a different procedure, then a new trace is installed.</p><p>Tracing respects tail calls to preserve loops, but its effect may be
visible through continuation marks. When a call to a traced procedure
occurs in tail position with respect to a previous traced call, then
the tailness of the call is preserved (and the result of the call is
not printed for the tail call, because the same result will be printed
for an enclosing call). Otherwise, however, the body of a traced
procedure is not evaluated in tail position with respect to a call to
the procedure.</p><p>The result of a <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span> expression is <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=void_undefined.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#<void></span></span></a>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">f</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28quote._~23~25kernel%29._if%29%29" class="RktStxLink" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._zero~3f%29%29" class="RktValLink" data-pltdoc="x">zero?</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._add1%29%29" class="RktValLink" data-pltdoc="x">add1</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">f</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._sub1%29%29" class="RktValLink" data-pltdoc="x">sub1</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span><span class="hspace"> </span><span class="RktSym">f</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">f</span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktOut">>(f 10)</span></p></td></tr><tr><td><p><span class="RktOut">> (f 9)</span></p></td></tr><tr><td><p><span class="RktOut">> >(f 8)</span></p></td></tr><tr><td><p><span class="RktOut">> > (f 7)</span></p></td></tr><tr><td><p><span class="RktOut">> > >(f 6)</span></p></td></tr><tr><td><p><span class="RktOut">> > > (f 5)</span></p></td></tr><tr><td><p><span class="RktOut">> > > >(f 4)</span></p></td></tr><tr><td><p><span class="RktOut">> > > > (f 3)</span></p></td></tr><tr><td><p><span class="RktOut">> > > > >(f 2)</span></p></td></tr><tr><td><p><span class="RktOut">> > > > > (f 1)</span></p></td></tr><tr><td><p><span class="RktOut">> > > >[10] (f 0)</span></p></td></tr><tr><td><p><span class="RktOut">< < < <[10] 0</span></p></td></tr><tr><td><p><span class="RktOut">< < < < < 1</span></p></td></tr><tr><td><p><span class="RktOut">< < < < <2</span></p></td></tr><tr><td><p><span class="RktOut">< < < < 3</span></p></td></tr><tr><td><p><span class="RktOut">< < < <4</span></p></td></tr><tr><td><p><span class="RktOut">< < < 5</span></p></td></tr><tr><td><p><span class="RktOut">< < <6</span></p></td></tr><tr><td><p><span class="RktOut">< < 7</span></p></td></tr><tr><td><p><span class="RktOut">< <8</span></p></td></tr><tr><td><p><span class="RktOut">< 9</span></p></td></tr><tr><td><p><span class="RktOut"><10</span></p></td></tr></table></td></tr><tr><td><p><span class="RktRes">10</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/trace..rkt)._untrace))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._untrace%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">untrace</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Undoes the effects of the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span> form for each <span class="RktVar">id</span>,
<span class="RktSym"><a href="set_.html#%28form._%28%28quote._~23~25kernel%29._set%21%29%29" class="RktStxLink" data-pltdoc="x">set!</a></span>ing each <span class="RktVar">id</span> back to the untraced procedure, but
only if the current value of <span class="RktVar">id</span> is a traced procedure. If
the current value of a <span class="RktVar">id</span> is not a procedure installed by
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span>, then the variable is not changed.</div></p><p>The result of an <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._untrace%29%29" class="RktStxLink" data-pltdoc="x">untrace</a></span> expression is <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=void_undefined.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#<void></span></span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._current-trace-notify))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-notify%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-notify</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-notify%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-notify</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines the way that trace output is
displayed. The string given to <span class="RktVar">proc</span> is a trace; it does not
end with a newline, but it may contain internal newlines. Each call or
result is converted into a string using <span class="RktSym"><a href="pretty-print.html#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>. The
parameter’s default value prints the given string followed by a newline to
<span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-output-port%29%29" class="RktValLink" data-pltdoc="x">current-output-port</a></span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._trace-call))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._trace-call%29%29" class="RktValDef RktValLink" data-pltdoc="x">trace-call</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span><span class="RktPn">#:<kw></span><span class="hspace"> </span><span class="RktVar">kw-arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._procedure~3f%29%29" class="RktValLink" data-pltdoc="x">procedure?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kw-arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Calls <span class="RktVar">proc</span> with the arguments supplied in
<span class="RktSym">args</span>, and possibly using keyword arguments. Also prints out the
trace information during the call, as described above in the docs for
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29" class="RktStxLink" data-pltdoc="x">trace</a></span>, using <span class="RktVar">id</span> as the name of <span class="RktVar">proc</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._current-trace-print-args))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-args%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-print-args</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="keywords.html#%28def._%28%28quote._~23~25kernel%29._keyword~3f%29%29" class="RktValLink" data-pltdoc="x">keyword?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._number~3f%29%29" class="RktValLink" data-pltdoc="x">number?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-args%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-print-args</a></span></span><span class="hspace"> </span><span class="RktVar">trace-print-args</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">trace-print-args</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="keywords.html#%28def._%28%28quote._~23~25kernel%29._keyword~3f%29%29" class="RktValLink" data-pltdoc="x">keyword?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._number~3f%29%29" class="RktValLink" data-pltdoc="x">number?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The value of this parameter is invoked to print out the arguments of a
traced call. It receives the name of the function, the function’s
ordinary arguments, its keywords, the values of the keywords, and a
number indicating the depth of the call.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._current-trace-print-results))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-results%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-print-results</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._number~3f%29%29" class="RktValLink" data-pltdoc="x">number?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-results%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-trace-print-results</a></span></span><span class="hspace"> </span><span class="RktVar">trace-print-results</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">trace-print-results</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._number~3f%29%29" class="RktValLink" data-pltdoc="x">number?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The value of this parameter is invoked to print out the results of a
traced call. It receives the name of the function, the function’s
results, and a number indicating the depth of the call.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._current-prefix-in))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-in%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-prefix-in</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-in%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-prefix-in</a></span></span><span class="hspace"> </span><span class="RktVar">prefix</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">prefix</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This string is used by the default value of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-args%29%29" class="RktValLink" data-pltdoc="x">current-trace-print-args</a></span>
indicating that the current line is showing the a call to a
traced function.</div></p><p>It defaults to <span class="RktVal">">"</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/trace..rkt)._current-prefix-out))"></a><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-out%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-prefix-out</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/trace | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-prefix-out%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-prefix-out</a></span></span><span class="hspace"> </span><span class="RktVar">prefix</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">prefix</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This string is used by the default value of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Ftrace..rkt%29._current-trace-print-results%29%29" class="RktValLink" data-pltdoc="x">current-trace-print-results</a></span>
indicating that the current line is showing the result
of a traced call.</div></p><p>It defaults to <span class="RktVal">"<"</span>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="interactive.html" title="backward to "18.4 Interactive Module Loading"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="Kernel_Forms_and_Functions.html" title="forward to "18.6 Kernel Forms and Functions"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|