1
0
Fork 0
cl-sites/novaspec.org/cl/f_invoke-debugger.html
2025-02-05 18:52:26 +01:00

257 lines
No EOL
5.3 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>invoke-debugger | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="f_invoke-debugger.html"
><LINK REL="next" HREF="f_break.html" TYPE="text/html" TITLE="break"
><LINK REL="prev" HREF="t_simple-warning.html" TYPE="text/html" TITLE="simple-warning"
><LINK REL="up" HREF="9_2_Conditions_Dictionary.html" TYPE="text/html" TITLE="9.2 Conditions Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="9_Conditions.html"
>9. Conditions</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="9_2_Conditions_Dictionary.html"
>9.2 Conditions Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="f_invoke-debugger.html"
>invoke-debugger</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="t_simple-warning.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="f_break.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="invoke-debugger"
></SPAN
><B
>invoke-debugger</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>Function</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Syntax</B
></DT
><DD
><P CLASS="j"
><B
>invoke-debugger</B
> <SPAN CLASS="cmssi"
>condition</SPAN
> <SPAN CLASS="arrow"
>&#8594;</SPAN
>|</P
></DD
><DT
><B
>Arguments and Values</B
></DT
><DD
><P CLASS="j"
><VAR CLASS="param"
>condition</VAR
> &#8212; a <A HREF="26_1_Glossary.html#condition"
><EM CLASS="term"
>condition</EM
></A
> <A HREF="26_1_Glossary.html#object"
><EM CLASS="term"
>object</EM
></A
>.</P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
><A HREF="f_invoke-debugger.html" CLASS="funref"
><B
>invoke-debugger</B
></A
> attempts to enter the debugger with <VAR CLASS="param"
>condition</VAR
>. </P
><P CLASS="j"
>If <A HREF="v_debugger-hook.html" CLASS="varref"
><B
>*debugger-hook*</B
></A
> is not <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>, it should be a <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
> (or the name of a <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
>) to be called prior to entry to the standard debugger. The <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
> is called with <A HREF="v_debugger-hook.html" CLASS="varref"
><B
>*debugger-hook*</B
></A
> bound to <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>, and the <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
> must accept two arguments: the <VAR CLASS="param"
>condition</VAR
> and the <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>value</EM
></A
> of <A HREF="v_debugger-hook.html" CLASS="misc"
><B
>*debugger-hook*</B
></A
> prior to binding it to <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>. If the <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
> returns normally, the standard debugger is entered. </P
><P CLASS="j"
>The standard debugger never directly returns. Return can occur only by a non-local transfer of control, such as the use of a restart function.</P
></DD
><DT
><B
>Examples</B
></DT
><DD
><PRE CLASS="screen"
> (ignore-errors ;Normally, this would suppress debugger entry
(handler-bind ((error #'invoke-debugger)) ;But this forces debugger entry
(error "Foo.")))
Debug: Foo.
To continue, type :CONTINUE followed by an option number:
1: Return to Lisp Toplevel.
Debug&gt;</PRE
></DD
><DT
><B
>Side Effects</B
></DT
><DD
><P CLASS="j"
><A HREF="v_debugger-hook.html" CLASS="varref"
><B
>*debugger-hook*</B
></A
> is bound to <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>, program execution is discontinued, and the debugger is entered.</P
></DD
><DT
><B
>Affected By</B
></DT
><DD
><P CLASS="j"
><A HREF="v_debug-io.html" CLASS="varref"
><B
>*debug-io*</B
></A
> and <A HREF="v_debugger-hook.html" CLASS="varref"
><B
>*debugger-hook*</B
></A
>.</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="f_error.html" CLASS="funref"
><B
>error</B
></A
>, <A HREF="f_break.html" CLASS="funref"
><B
>break</B
></A
></P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="t_simple-warning.html" CLASS="prev"
>&#8592;</A
><A HREF="f_break.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>