Skip to content

Instantly share code, notes, and snippets.

View amir-abdi's full-sized avatar

Amir Abdi amir-abdi

View GitHub Profile
@amir-abdi
amir-abdi / l.txt
Last active December 12, 2022 09:23
✦ ❯ python foo/bar.py
[3] > /Users/amirabdi/pdb_like_a_pro/foo/bar.py(5)func3()
-> print('func1', sky, ocean, sea)
(Pdb++) l
1 # foo/bar.py
2
3 def func3(sky, ocean, sea):
4 breakpoint()
5 -> print('func1', sky, ocean, sea)
6
def recur_fibo(value):
if value <= 1:
return value
else:
return(recur_fibo(value-1) + recur_fibo(value-2))
recur_fibo(10)
import requests
requests.get('https://google.com')
(Pdb++) b /path/to/foo.py:10
class MyClass:
"""A delicate class indeed!"""
pass
# foo/bar.py
def func3(sky, ocean, sea):
breakpoint()
print('func1', sky, ocean, sea)
def func2(sky, ocean):
"""
This is a long docstring to enable scrolling.
python -m foo.bar
python -m pdb -m foo.bar
python -m pdb -c continue foo.py
python -m pdb foo.py
pip install pdbpp # install via pip
conda install -c conda-forge pdbpp # install via conda