Skip to content

Instantly share code, notes, and snippets.

View amir-abdi's full-sized avatar

Amir Abdi amir-abdi

View GitHub Profile
python -c "breakpoint()"
# Will pause execution at the breakpoint and start the debugger
PYTHONBREAKPOINT=0 python -c "breakpoint()"
# Skips the breakpoint
pip install pdbpp # install via pip
conda install -c conda-forge pdbpp # install via conda
python -m pdb foo.py
python -m pdb -c continue foo.py
python -m foo.bar
python -m pdb -m foo.bar
# 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.
class MyClass:
"""A delicate class indeed!"""
pass
(Pdb++) b /path/to/foo.py:10
import requests
requests.get('https://google.com')
def recur_fibo(value):
if value <= 1:
return value
else:
return(recur_fibo(value-1) + recur_fibo(value-2))
recur_fibo(10)