Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cohexistance with web_pdb #527

Open
svalo opened this issue Nov 10, 2023 · 0 comments
Open

Cohexistance with web_pdb #527

svalo opened this issue Nov 10, 2023 · 0 comments

Comments

@svalo
Copy link

svalo commented Nov 10, 2023

When pdbpp and web_pdb are installed in the same env, web_pdb is unable to run giving following traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/Code/module.py", line 1772, in backup_data_tgz
    web_pdb.set_trace()
  File "/home/user/.virtualenvs/venv/lib/python3.10/site-packages/web_pdb/__init__.py", line 256, in set_trace
    pdb = WebPdb(host, port, patch_stdstreams)
  File "/home/user/.virtualenvs/venv/lib/python3.10/site-packages/pdbpp.py", line 276, in __call__
    obj.__init__(*args, **kwargs)
TypeError: WebPdb.__init__() got an unexpected keyword argument 'start_filename'

This happens because, by default, pdbpp hijacks pdb.

Setting environment variable PDBPP_HIJACK_PDB=0 solves this issue.

I struggled a bit before noticing that pdbpp hijacks pdb.

I have three proposal:

  • Would it be posisble to mention in README.md that by default pdbpp hijacks pdb?
  • Would it be possible to to set the default not to hijack pdb and provide instructions to do so?
  • Would it be possible to have a compatible interface with pdb? I have no clue of how pdbpp is implemented and how much the effort for this would be

FYI: I opened also romanvm/python-web-pdb#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant