-
Notifications
You must be signed in to change notification settings - Fork 142
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
Provide APIs to stop listening / stop debugger #870
Comments
Can you add this line before any other calls to debugpy: debugpy.log_to(r"C:\Logs") # adjust path as needed and then share the |
|
Hm, is that the only file that was there? It's supposed to create several, one for each component of the debugger - I would be particularly interested in the one named |
no, there is only one log |
顺便说一句,我正在使用pythonnet ,python代码是从c#代码 |
Ohh, I see the reason now. Because you're hosting Python inside of your own app, The workaround is to explicitly specify the interpreter by using debugpy.configure(python=r'c:\python310\python.exe') # adjust as needed |
great, but I can not attach twice.
|
If I understand the error message correctly, you're trying to call |
hi @int19h, is there any api like |
We don't currently have an api to stop listening a previous |
Note that any new APIs won't help in this particular case, since @heartacker is on Python 2.7, which we no longer support in new debugpy releases. One other possibility that remains is to use |
no, I am using python 3.10, but we hosted python in my own c# app. when my code run to end, the c#-host-app still alivea and will not close the listening, so that we couldn't listen again by running the debugpy.listen(), thus, we want some api to stop the listening at the end of my python code hosted in c#-app |
hi, is there any one can help me, I really need some api to stop the listening because we don't need to exit the host app which embed the python engine after finishing my py script |
maybe it will be better please |
This makes sense. We can remember the host/port; for that matter, it might be convenient to expose it in the public API also, on top of returning it from listen(). |
great, thanks and hope that we could earn this ASAP 👯 |
Before creating a new issue, please check the FAQ to see if your question is answered there.
Environment data
Actual behavior
connect success
Expected behavior
Steps to reproduce:
The text was updated successfully, but these errors were encountered: