From d0b057024649b41b7f3d5249da6067aa348703a2 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 24 Aug 2022 19:10:33 +0900 Subject: [PATCH] gh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost --- Doc/library/functions.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index da7de18722f87e..fbde9129274e95 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -164,6 +164,8 @@ are always available. They are listed here in alphabetical order. :func:`sys.breakpointhook` can be set to some other function and :func:`breakpoint` will automatically call that, allowing you to drop into the debugger of choice. + If :func:`sys.breakpointhook` is not available to be called, this function will + raise :exc:`RuntimeError`. .. audit-event:: builtins.breakpoint breakpointhook breakpoint