microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.81k stars 131 forks source link

Matplotlib backend issue (TkAgg) #1652

Open balavay opened 1 month ago

balavay commented 1 month ago

Hey, I am having an issue plotting stuff in the debugger.

When I import matplotlib and print the backend, the output is 'tkagg'. When I try to plot something, I will get an unresponsive blank figure (unless i call pause which will make desired plot appear but albeit remain unresponsive). When I set backend to 'TkAgg', it works as expected.

When I run the script normally not in the debugger, everything works fine and the plot appears.

What is weird is that my colleague has the same versions of python matplotlib and vs code yet by default has a backend of 'TkAgg'. I am not sure what's causing this discrepancy in default backend between the two of us. In any case, according to matplotlib documentation and the linked issue, tkagg and TkAgg should be equivalent.

Relevant issue: Matplotlib VS Code version: 1.92.1 Python: 3.9.5 Matplotlib: (3.9.1 - 3.9.2)

suxpert commented 3 weeks ago

Possible duplicate of #1633. You may downgrade matplotlib to 3.8 as a workaround until this issue has been fixed.