
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
chatpdb is a drop-in replacement for ipdb or pdb that lets you ask questions while debugging.

chatpdb meets you where you are - AI tooling that's only invoked when you need it.
pip install chatpdb
Ensure that you have OPENAI_API_KEY set in your environment.
export OPENAI_API_KEY=...```
## Usage
In your code:
```python3
import chatpdb; chatpdb.set_trace()
Simply type y to receive a summary of the current code and stack trace.
> /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.
> /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. [...]
chatpdb uses the OpenAI API to generate responses to your questions. It uses the gpt-4-turbo model by default.
chatpdb will automatically include relevant context from the current frame and stack trace, as well as
exception information if one has been raised.
Just like ipdb and pdb, chatpdb supports many different entrypoints.
Running code:
import chatpdb; chatpdb.run('print("hello")')
import chatpdb; chatpdb.runcall(lambda x: x + 1, 1)
As a decorator:
@chatpdb.cex
def sample_cex_function():
raise # any exception within the decorated function will trigger chatpdb
As a context manager:
with chatpdb.launch_chatpdb_on_exception():
raise # any exception within the with block will trigger chatpdb
On files:
python3 -m chatpdb file.py
post-mortem support:
chatpdb.pm()
See the documentation of ipdb or pdb for the full api.
You can use more specific environment variables to configure an OpenAI key and preferred model for chatpdb. The following environment variables are supported:
CHAT_PDB_OPENAI_API_KEY: Your OpenAI API keyCHAT_PDB_OPENAI_MODEL: The model to use for chatpdb. Default is 'gpt-4-turbo'FAQs
A chatgpt enabled python debugger
We found that chatpdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.