Skip to content

Commit 831870a

Browse files
authored
Update the doc to use breakpoint() (#20691)
According to my friend ChatGPT, using pdb.set_trace() is too old-school. Update the doc to use breakpoint() instead to stay young 😎
1 parent ca13f77 commit 831870a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/source-pytorch/debug/debugging_basic.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ A breakpoint stops your code execution so you can inspect variables, etc... and
3333
x = 2
3434
3535
# set breakpoint
36-
import pdb
37-
38-
pdb.set_trace()
36+
breakpoint()
3937
y = x**2
4038
4139
In this example, the code will stop before executing the ``y = x**2`` line.

0 commit comments

Comments
 (0)