-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process attach for 3.11 on Mac #234
Comments
It should work... can you send a screenshot showing the output you have when it fails? |
I tried to make a minimum demo to demonstrate the different behavior between 3.9 & 3.11 on Mac. First of all, I have a very simply script running, basically a while loop. And yes I know without the debugger running on it, it is not expected to work. I used
which was expected - the attach and code injection succeeded but there's no debugger running on the process being attached. After trying to attach, the process being attached exited from an exception as well. Then I did the exact same thing on 3.11.0 on Mac. The output was much simpler:
Notice that I'm now in lldb after running the script, instead of my terminal. The process being attached kept running without interruption. I believe this meant that at least the code injection was not successful. Not sure if you have a Mac around but this should be pretty easy to reproduce. |
From what you're describing, it says that i.e.:
is mentioned some log messages... do you think you can find those there? I searched a bit and https://developer.apple.com/forums/thread/676028 also seems interesting... It says that it's possible that something as a hardened runtime may be set which disables the attach, so, maybe it'd be worth trying with a different Python build (conda-forge seems to have Python 3.11 already, can you try with that)? Also can you confirm if this is a As a note, the issue seems to be all before the debugger even has a chance to act as it's You can probably just try connecting |
Okay I spent some time investigating this. First of all, yes the error I had was not a debugger issue, it was Mac. I believe it's because the python app I was using used hardened runtime for some reason, so lldb can not attach to it. And it's on a Mac with intel CPU. I believe starting from python3.10, there's only the Then the bad news, I used the official python package for Mac which was also the package setup-python uses. I tried to use So, from one perspective, this issue is solved. However, from another perspective, it could mean that PyDev won't work on 3.11 + Mac anymore. The worse news is, this might be the case for all future python versions on Mac. I'm not sure if this is something you want to follow up with, may or may not be an issue that the debuggers are not able to work on Mac anymore, but let me know if I there's any other information I could provide with. |
Hi!
I was wondering if process attach is supported on 3.11 on Mac now? I saw some code checkins for it but I'm not sure if it's done yet. I was having problems on this specific combination. It works on 3.11 on Linux/Windows, and 3.10 on Mac. However, I'm kind of using a customized version with the process attach code.
If it's a known issue, then I can wait until it's fixed. If it is supposed to work, I can try to collect more information and see if I can provide a fast repro demo.
Thanks,
Tian
The text was updated successfully, but these errors were encountered: