Skip to content

Commit 51a9058

Browse files
committed
add no-execute tags for sphinx-tojupyter
1 parent d5b7de9 commit 51a9058

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lectures/debugging.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ plot_log() # Call the function, generate plot
122122
But this time we type in the following cell block
123123

124124
```{code-block} ipython
125+
:no-execute:
125126
%debug
126127
```
127128

128129
You should be dropped into a new prompt that looks something like this
129130

130131
```{code-block} ipython
132+
:no-execute:
131133
ipdb>
132134
```
133135

@@ -139,6 +141,7 @@ For example, here we simply type the name `ax` to see what's happening with
139141
this object:
140142

141143
```{code-block} ipython
144+
:no-execute:
142145
ipdb> ax
143146
array([<matplotlib.axes.AxesSubplot object at 0x290f5d0>,
144147
<matplotlib.axes.AxesSubplot object at 0x2930810>], dtype=object)
@@ -151,6 +154,7 @@ To find out what else you can do from inside `ipdb` (or `pdb`), use the
151154
online help
152155

153156
```{code-block} ipython
157+
:no-execute:
154158
ipdb> h
155159
156160
Documented commands (type help <topic>):
@@ -204,6 +208,7 @@ To investigate, it would be helpful if we could inspect variables like `x` durin
204208
To this end, we add a "break point" by inserting `breakpoint()` inside the function code block
205209

206210
```{code-block} python3
211+
:no-execute:
207212
def plot_log():
208213
breakpoint()
209214
fig, ax = plt.subplots()
@@ -217,6 +222,7 @@ plot_log()
217222
Now let's run the script, and investigate via the debugger
218223

219224
```{code-block} ipython
225+
:no-execute:
220226
> <ipython-input-6-a188074383b7>(6)plot_log()
221227
-> fig, ax = plt.subplots()
222228
(Pdb) n

0 commit comments

Comments
 (0)