File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 2020
2121
2222def main (args ):
23+ # If we're talking DAP over stdio, stderr is not guaranteed to be read from,
24+ # so disable it to avoid the pipe filling and locking up. This must be done
25+ # as early as possible, before the logging module starts writing to it.
26+ if args .port is None :
27+ sys .stderr = open (os .devnull , "w" )
28+
2329 from debugpy import adapter
2430 from debugpy .common import compat , log , sockets
2531 from debugpy .adapter import clients , servers , sessions
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ def __init__(self, sock):
4343 # that are going to be used for DAP communication from now on.
4444 sys .stdin = open (os .devnull , "r" )
4545 sys .stdout = open (os .devnull , "w" )
46- sys .stderr = open (os .devnull , "w" )
4746 else :
4847 stream = messaging .JsonIOStream .from_socket (sock )
4948
You can’t perform that action at this time.
0 commit comments