This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ✦ ❯ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def recur_fibo(value): | |
| if value <= 1: | |
| return value | |
| else: | |
| return(recur_fibo(value-1) + recur_fibo(value-2)) | |
| recur_fibo(10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| requests.get('https://google.com') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (Pdb++) b /path/to/foo.py:10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyClass: | |
| """A delicate class indeed!""" | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -m foo.bar | |
| python -m pdb -m foo.bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -m pdb -c continue foo.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -m pdb foo.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install pdbpp # install via pip | |
| conda install -c conda-forge pdbpp # install via conda |
NewerOlder