Skip to content

Instantly share code, notes, and snippets.

@SylvainCorlay
Created May 12, 2021 15:09
Show Gist options
  • Save SylvainCorlay/a6405bbdfa9d58a670a67f3a47741bd2 to your computer and use it in GitHub Desktop.
Save SylvainCorlay/a6405bbdfa9d58a670a67f3a47741bd2 to your computer and use it in GitHub Desktop.
Ipykernel debugger example
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "pretty-merchant",
"metadata": {},
"source": [
"Start the debugger and add a breakpoint in the loop, then step into the `foo` function"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "outside-bishop",
"metadata": {},
"outputs": [],
"source": [
"def foo(arg):\n",
" print(arg)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "personal-apparel",
"metadata": {},
"outputs": [],
"source": [
"for i in range(10):\n",
" foo(i)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
ipykernel==6.0.0b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment