* Expose CLI Options through public API
Expose a public API that can retrieve the processed CLI options for the
current process launched through the debugpy CLI. This enables code to
be able to retrieve options like the port and adapter access token to be
used for launching their own child process' that can be debugged.
* Fix test by sending dict not dataclass object
* Fix debugger stepping actions in forked process
Fix the debugger stepping state when debugging a process that has been
forked from the main process. The new sys.monitoring mechanism didn't
fully clear the thread local storage after a fork leading to a state
where the forked child process tracked the wrong thread information and
was never updated on the latest continue action.
* Add stepping test for forked process
* Add line ending back in for cleaner diff
* More formatting reversions
* Add parent-session-pid argument
Add the ability to specify the parent process id when connecting a new
DAP server to the client. This value is used instead of the actual
process' parent id so that it can be associated with a specific debug
session even if it hasn't been spawned directly by that parent process.
* Add tests for new option
* Add initial support for IPv6
* address comments (part 1)
* quick clean up of missed fix suggestion
* Fix misassigned default serving server address in adapter client
* add wrapper method to get host and port from`getsockname`
* Fix multithreaded stepping to not have 'return' events when a thread is already suspended
* Update after removing blank line
* Remove unnecessary change for start method
* Add more logging for 313 failure
* Auto retry failures
* Add retry for socket.write
* Put watchdog timeout back and drop errors
* Fix linter
* Add message on error so at least it's logged
* Try a different combination
* Fix linter
* Go back to longer watchdog
* Try a different tactic
* Don't log failure and wait a bit in the watchdog
* Go back to the NoMoreMessages
* Just disable watchdog in 3.13 for now
* Change watchdog timeout
* Try different algorithm for ports in use
* Add retries option
* Fix usages of get_test_server_port
* Retries don't seem to work at global level with xdist, use retries on individual tests
* Changes from pushing to pydevd
* Update some time outs to get flakey tests to pass
* Fix string failure
* String case backwards. Fixup test in pydevd
* Using callstack for exception check not sufficient
* Too restrictive on pydevd matching
* Try somethign better than just checking 'pydev'
* Retry a flakey test
* Disable flakey tests
* Another flakey test
* Increase timeout for attach
* Try upping timeout
* Up watchdog timeout
* Up some more timeouts
* Try delaying shutdown of test apps
* Don't output extra things that tests don't expect
* Fix output differences in 3.9? Not sure what that's about
* Fixup line differences in 3.9 with extra sleep
* Fix linter errors
* Fix breakpoint bugs
* Get debug launch working
* Turn Cython support back on
* Fix test failures
* Fix gevent test to be skipped
* Missed a version change in pipeline
* Fix comment
* Review feedback
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#357: "argsExpansion" does not do what it says in VSCode
Treat non-array "args" in debug config as a request to prevent shell argument escaping and allow shell expansion.
Remove "argsExpansion".