This is pulling in @fabioz's latest changes for sys.monitoring and then fixing up any issues found with the debugpy tests.
A lot of the changes were made by Fabio since the latest pull from pydevd, so I also created this PR to compare what changes I made to Fabio's baseline:
rchiodo/PyDev.Debugger#1
Meaning you really only need to look at that other PR to see what changes I made. The rest of the changes here are from Fabio or ruff doing reformating.
After this goes through, we should have sys.monitoring support in debugpy. We can decide later if we want to implement our own support as @int19h started.
Fixes#1496
Use YAML templates for setting up Python and running tests.
Use matrix instead of separate jobs for Windows 32-bit and 64-bit runs.
Change --debugpy-logs to --debugpy-log-dir with explicit destination, and use that to capture and publish test logs in CI.
Delete logs for passed tests by default, and add --debugpy-log-passed to opt out.
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.
Fix various bugs around handling of disconnect in JsonIOStream and JsonMessageChannel.
Fix handling of DAP "terminated" event in debug.Session.
Add --ptvsd-logs and --pydevd-logs switches to pytest.
Improve message logging to fully capture the raw message data in the logs if deserialization fails.
Log all debuggee environment variables in debug.Session, and improve log readability.