|
12 | 12 | ] |
13 | 13 | }, |
14 | 14 | { |
15 | | - "cell_type": "code", |
16 | | - "execution_count": null, |
17 | | - "id": "3d0080c9-01ad-4120-ad3d-37700cdf2a6f", |
| 15 | + "cell_type": "markdown", |
| 16 | + "id": "bd498d45-9d1e-4860-854b-a94993ffa77b", |
18 | 17 | "metadata": {}, |
19 | | - "outputs": [], |
20 | 18 | "source": [ |
21 | | - "🚧\n", |
22 | | - "Material under construction\n", |
23 | | - "🚧" |
| 19 | + "We are humans, we make mistakes – that's very much true for coding.\n", |
| 20 | + "Finding errors in our code is fundamental skill to train.\n", |
| 21 | + "\n", |
| 22 | + "We will cover here a few tools that help us find and fix errors more quickly." |
24 | 23 | ] |
25 | 24 | }, |
26 | 25 | { |
27 | 26 | "cell_type": "markdown", |
28 | | - "id": "bd498d45-9d1e-4860-854b-a94993ffa77b", |
| 27 | + "id": "3789894a-e176-4cc5-872a-c328b66b1359", |
29 | 28 | "metadata": {}, |
30 | 29 | "source": [ |
31 | | - "We are humans, we make mistakes and that's very much true for coding.\n", |
32 | | - "Finding errors in our code is fundamental skill to train since we cannot avoid making mistakes.\n", |
33 | | - "The goal is to get better at finding and fixing them quickly." |
| 30 | + "## What is a debugger?\n", |
| 31 | + "\n", |
| 32 | + "A debugger is a device that allows us to interrupt code execution and jump into the execution context in a interactive mode, so that we can inspect and run code to find out what's going on. \n", |
| 33 | + "We called that to \"set a breakpoint\" or \"set a trace\".\n", |
| 34 | + "\n", |
| 35 | + "There are a few options to do that natively in python." |
34 | 36 | ] |
35 | 37 | }, |
36 | 38 | { |
37 | 39 | "cell_type": "markdown", |
38 | 40 | "id": "55a9413f-5a5a-40c1-a2b7-b642f0a54aec", |
39 | 41 | "metadata": {}, |
40 | 42 | "source": [ |
41 | | - "## Python debugger, breakpoints" |
| 43 | + "## Python debugger, breakpoints\n", |
| 44 | + "The python standard library includes `pdb` module.\n", |
| 45 | + "\n", |
| 46 | + "```python\n", |
| 47 | + "import pdb; pdb.set_trace()\n", |
| 48 | + "```" |
42 | 49 | ] |
43 | 50 | }, |
| 51 | + { |
| 52 | + "cell_type": "code", |
| 53 | + "execution_count": null, |
| 54 | + "id": "b40ea608-89a9-4cbd-b07f-4f9a33699d89", |
| 55 | + "metadata": {}, |
| 56 | + "outputs": [], |
| 57 | + "source": [] |
| 58 | + }, |
44 | 59 | { |
45 | 60 | "cell_type": "markdown", |
46 | 61 | "id": "4ae14f36-84e6-4def-9240-7a423c587e9c", |
|
74 | 89 | "name": "python", |
75 | 90 | "nbconvert_exporter": "python", |
76 | 91 | "pygments_lexer": "ipython3", |
77 | | - "version": "3.10.13" |
| 92 | + "version": "3.13.3" |
78 | 93 | } |
79 | 94 | }, |
80 | 95 | "nbformat": 4, |
|
0 commit comments