smcoll / vscode-python-14284

Reproducible steps to demonstrate https://github.com/microsoft/vscode-python/issues/14284

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

steps to reproduce

  1. Clone this repo
  2. Make and activate a virtual environment at .venv (in my case, it's installing as Python 3.8):
    python3 -m venv .venv
    . .venv/bin/activate
    
  3. Install requirements
    pip install -r requirements.txt
    
  4. Set breakpoints:
    • lines 11 and 13 of main.py - demonstrates debugger working in our module
    • line 445 of .venv/lib/python3.8/site-packages/pydantic/main.py (in BaseModel.parse_obj) - _won't break here
    • line 31 of .venv/lib/python3.8/site-packages/chardet/__init__.py (in detect) - sanity check demonstrating that breakpoints in installed libs do work in general
  5. Run the "Python: Attach using listen" launch configuration with F5
  6. Run the included file:
    python -m main
    

Expected behavior is that the debugger will break at all breakpoints. The breakpoint in pydantic will not work, but the others will. This example only shows one example of a failing Pydantic breakpoint, but a spot check indicates that it's not isolated to a particular Pydantic module.

About

Reproducible steps to demonstrate https://github.com/microsoft/vscode-python/issues/14284


Languages

Language:Python 100.0%