mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Refactor tests.debug to accommodate ptvsd.server spawning the adapter, and remove the need for "custom_client" and "custom_server" start methods.
Fix launcher not propagating debuggee exit code. Fix attach-by-PID without explicit --log-dir overriding PTVSD_LOG_DIR (and disabling logging). Improve test logging, with a separate directory for every test. Various test fixes.
This commit is contained in:
parent
346ebd47cd
commit
8f358d6e0f
45 changed files with 1878 additions and 2818 deletions
|
|
@ -1,29 +0,0 @@
|
|||
from debug_me import backchannel, ptvsd, scratchpad
|
||||
|
||||
import os
|
||||
import time
|
||||
|
||||
ptvsd.enable_attach(("localhost", int(os.environ["ATTACH1_TEST_PORT"])))
|
||||
|
||||
if int(os.environ["ATTACH1_WAIT_FOR_ATTACH"]):
|
||||
backchannel.send("wait_for_attach")
|
||||
ptvsd.wait_for_attach()
|
||||
|
||||
if int(os.environ["ATTACH1_IS_ATTACHED"]):
|
||||
backchannel.send("is_attached")
|
||||
while not ptvsd.is_attached():
|
||||
print("looping until is_attached")
|
||||
time.sleep(0.1)
|
||||
|
||||
if int(os.environ["ATTACH1_BREAK_INTO_DEBUGGER"]):
|
||||
backchannel.send("break_into_debugger?")
|
||||
assert backchannel.receive() == "proceed"
|
||||
ptvsd.break_into_debugger()
|
||||
print("break") # @break_into_debugger
|
||||
else:
|
||||
scratchpad["paused"] = False
|
||||
backchannel.send("loop?")
|
||||
assert backchannel.receive() == "proceed"
|
||||
while not scratchpad["paused"]:
|
||||
print("looping until paused")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
import debug_me # noqa
|
||||
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue