On 3/14/2023 7:13 AM, Rokas Kupstys wrote: > Still, i think there can be an improvement in this area, and it would > likely be quite cheap. The biggest problem is people being unaware what > is going on. IsDebuggerPresent()/CheckRemoteDebuggerPresent() could be > used for checking debugger presence and when debugging state of main > process and child process do not match, launcher could print some link > to documentation describing what is going on and how situation could be > solved. I am just not sure about any possible race conditions (no idea > how fast debuggers attack to child processes).
Detecting when a debugger is attached and printing a debug message on exit from the launcher might be a neat idea. Care to submit a bug at https://github.com/python/cpython?
The change would likely have to go into PC\launcher.c (for venvs) as well as PC\launcher2.c right now (for py.exe).
Native debuggers usually hook process creation, so they should attach immediately with no risk of missing anything.
Cheers, Steve _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/2NH3T2KZTXIIWSPPUTYA3S66XEDG56MK/ Code of Conduct: http://python.org/psf/codeofconduct/