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
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.
* Fix#1090: Port refactored command line parser to master
* Fix#921: Double dash in program arguments gets caught and crashes pydevd
* Fix#1013: -h/--help arg to program instead shows help for interpreter
* Add new JSON IPC implementation to be shared between the product and the tests.
Add pytest-based test support, and wire it up to setup.py and Travis.
Dial pylint down to complain about important things only.
Various minor fixes exposed by pylint.
Add basic .vscode/settings.json for linter settings (and anything else that's workspace-specific).
Fixes#831.