Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

sys.__breakpointhook__ should be available when __builtin__.breakpoint is set (pre Python 3.7) #766

Closed
fabioz opened this issue Aug 23, 2018 · 2 comments
Milestone

Comments

@fabioz
Copy link
Contributor

fabioz commented Aug 23, 2018

This is because pytest checks if __builtin__.breakpoint is set but later moves on to use sys.__breakpointhook__ which wouldn't be set.

i.e.:

https://github.com/pytest-dev/pytest/blob/master/src/_pytest/debugging.py#L67

I'll submit a fix for this shortly.

@fabioz fabioz changed the title sys.__breakpointhook__ should be available when __builtin__.breakpoint is set sys.__breakpointhook__ should be available when __builtin__.breakpoint is set (pre Python 3.7) Aug 23, 2018
fabioz added a commit to fabioz/ptvsd that referenced this issue Aug 23, 2018
@karthiknadig karthiknadig added this to the August 2018 milestone Aug 27, 2018
@madig
Copy link

madig commented Sep 25, 2018

I'm facing this error in VSCode 1.27.2, Python extension 2018.8.0, Python 3.6.5. When will the fix land? Any workarounds until then?

@fabioz
Copy link
Contributor Author

fabioz commented Sep 25, 2018

@madig One option may be applying that change locally to have it working -- specifically the change in pydevd.py in (fabioz@8c1acdf).

You create a program/execute it in debug mode with the contents:

import pydevd
print(pydevd.__file__)

to know the location of that file locally.

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

No branches or pull requests

3 participants