You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
Python version (& distribution if applicable, e.g. Anaconda): 3.5
Using VS Code or Visual Studio: VSC
Actual behavior
I see this error on detach.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/ptvsd/_vendored/pydevd/pydevd.py", line 1905, in stoptrace
debugger.exiting()
File "/usr/local/lib/python3.5/dist-packages/ptvsd/_vendored/pydevd/pydevd.py", line 1590, in exiting
sys.stdout.flush()
File "/usr/local/lib/python3.5/dist-packages/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_io.py", line 37, in flush
r.flush()
ValueError: I/O operation on closed file.
Expected behavior
Should not throw error. Should continue user process.
On Windows, the repro steps trigger a different exception, when detaching from the root process:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python\3.7-64\lib\concurrent\futures\process.py", line 101, in _python_exit
thread_wakeup.wakeup()
File "C:\Python\3.7-64\lib\concurrent\futures\process.py", line 89, in wakeup
self._writer.send_bytes(b"")
File "C:\Python\3.7-64\lib\multiprocessing\connection.py", line 183, in send_bytes
self._check_closed()
File "C:\Python\3.7-64\lib\multiprocessing\connection.py", line 136, in _check_closed
raise OSError("handle is closed")
OSError: handle is closed
int19h
added a commit
to int19h/ptvsd
that referenced
this issue
Mar 14, 2019
…ion on closed file
Gracefully handle failures when flushing potentially closed standard streams on exit.
Add more multiprocess logging, and fix sys.argv logging.
OSError is an unrelated issue, and happens because we kill child processes when detaching from parent. ProcessPoolExecutor expects them to still be there when running its cleanup code via atexit, and doesn't try to guard against the possibility of failure. Not sure what we can do here.
Environment data
Actual behavior
I see this error on detach.
Expected behavior
Should not throw error. Should continue user process.
Steps to reproduce:
Launch the following script:
Using the following command:
python3 -m ptvsd --host 0.0.0.0 --port 5678 --wait --multiprocess ./mymain.py
Attach to this from VSC, with breakpoint set on the
print
line.The text was updated successfully, but these errors were encountered: