MCPcopy Create free account
hub / github.com/microsoft/debugpy / _wait_for_user_input

Function _wait_for_user_input

src/debugpy/launcher/debuggee.py:230–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229
230def _wait_for_user_input():
231 if sys.stdout and sys.stdin and sys.stdin.isatty():
232 from debugpy.common import log
233
234 try:
235 import msvcrt
236 except ImportError:
237 can_getch = False
238 else:
239 can_getch = True
240
241 if can_getch:
242 log.debug("msvcrt available - waiting for user input via getch()")
243 sys.stdout.write("Press any key to continue . . . ")
244 sys.stdout.flush()
245 msvcrt.getch()
246 else:
247 log.debug("msvcrt not available - waiting for user input via read()")
248 sys.stdout.write("Press Enter to continue . . . ")
249 sys.stdout.flush()
250 sys.stdin.read(1)

Callers 1

wait_for_exitFunction · 0.85

Calls 4

isattyMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…