Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5877081

Browse filesBrowse files
authored
migrate code-block to literal with syntax highlighting (#106)
1 parent 6d3247a commit 5877081
Copy full SHA for 5877081

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎lectures/debugging.md‎

Copy file name to clipboardExpand all lines: lectures/debugging.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ plot_log() # Call the function, generate plot
121121

122122
But this time we type in the following cell block
123123

124-
```{code-block} ipython
124+
```ipython
125125
%debug
126126
```
127127

128128
You should be dropped into a new prompt that looks something like this
129129

130-
```{code-block} ipython
130+
```ipython
131131
ipdb>
132132
```
133133

@@ -138,7 +138,7 @@ Now we can investigate the value of our variables at this point in the program,
138138
For example, here we simply type the name `ax` to see what's happening with
139139
this object:
140140

141-
```{code-block} ipython
141+
```ipython
142142
ipdb> ax
143143
array([<matplotlib.axes.AxesSubplot object at 0x290f5d0>,
144144
<matplotlib.axes.AxesSubplot object at 0x2930810>], dtype=object)
@@ -150,7 +150,7 @@ problem.
150150
To find out what else you can do from inside `ipdb` (or `pdb`), use the
151151
online help
152152

153-
```{code-block} ipython
153+
```ipython
154154
ipdb> h
155155
156156
Documented commands (type help <topic>):
@@ -203,7 +203,7 @@ To investigate, it would be helpful if we could inspect variables like `x` durin
203203

204204
To this end, we add a "break point" by inserting `breakpoint()` inside the function code block
205205

206-
```{code-block} python3
206+
```python3
207207
def plot_log():
208208
breakpoint()
209209
fig, ax = plt.subplots()
@@ -216,7 +216,7 @@ plot_log()
216216

217217
Now let's run the script, and investigate via the debugger
218218

219-
```{code-block} ipython
219+
```ipython
220220
> <ipython-input-6-a188074383b7>(6)plot_log()
221221
-> fig, ax = plt.subplots()
222222
(Pdb) n

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.