Skip to content

Commit bbaa00e

Browse files
committed
add example
1 parent 0a4081a commit bbaa00e

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

example/some_module.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Helper module."""
2+
3+
4+
def some_function(t):
5+
"""Another silly function."""
6+
return t + " python"

example/test.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Sample program.
2+
3+
Bring up the debugger with option-r.
4+
"""
5+
6+
from some_module import some_function
7+
8+
9+
def do_something(x):
10+
"""A silly function."""
11+
y = x
12+
z = some_function(y) # Stepping in opens the relevant file
13+
return z + " rules!"
14+
15+
if __name__ == "__main__":
16+
import sys
17+
x = sys.argv[1] # Set a breakpoint with option-shift-R or palette
18+
y = do_something(x)
19+
print(y)

0 commit comments

Comments
 (0)