Skip to content

Commit

Permalink
update readme examples
Browse files Browse the repository at this point in the history
  • Loading branch information
caelean committed Apr 18, 2024
1 parent bf0d2b8 commit 80bfb7b
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,23 @@ import chatpdb; chatpdb.set_trace()
```
Simply type `y` to receive a summary of the current code and stack trace.
```python3
> /Users/you/sample.py (9) test_function()
8
----> 9 import chatpdb; chatpdb.set_trace()
10
ipdb> y
You are currently in a python debugger
> /Programming/test-chatpdb/lib.py(2)echo_platform()
1 def echo_platform(platform: str):
----> 2 print("You are running on:" + platform)
3
ipdb> y
The exception occurred because the function `echo_platform` tries to concatenate the string "You are running on:" with the `platform` variable, which is `None`. [...]
```

Type `y "prompt"` to ask a question.

```python3
> /Users/you/sample.py (9) test_function()
8
----> 9 import chatpdb; chatpdb.set_trace()
10
ipdb> y "what does chatpdb do in this case?"
You are currently in a python debugger, etc.
> /Programming/test-chatpdb/lib.py(2)echo_platform()
1 def echo_platform(platform: str):
----> 2 print("You are running on:" + platform)
3
ipdb> y "Why is platform coming through as None?"
The variable `platform` is coming through as `None` because the environment variable `"PLATFORM"` is not set in your system's environment variables. [...]
```


Expand Down

0 comments on commit 80bfb7b

Please sign in to comment.