-
I would like to communicate with debugpy from a custom client I am building over tcp locally.
Then I establish a connection to the port marked as internal and get the following request:
After looking at the source code I found how the json response should look like and sent this: (As for the token, I saw in the source it should match the server token, this might be wrong though...)
After this I do not get a response. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Did you look at the order of events here (specifically the initialize part)? You should be sending an 'initialize' event. |
Beta Was this translation helpful? Give feedback.
-
I think you mean I should send an 'initialize' request and not an event, right?. I have tried this already as specified in
I get no response from neither internal or external ports. Does one not get a response with an error message if the request is not as expected? Any response information would be useful. Sadly I don`t receive any response to any kind of request I try. |
Beta Was this translation helpful? Give feedback.
-
Hello @rchiodo, I just wanted to thank you. I have come back to my project after months and I was able to resolve my issue. I had misconceptions about which socket was meant for the client and which for the debugpy server, and I was not aware of the debugpy adapter-server-pydevd dynamic. Using VS Code to attach to debugpy and watching the logs helped me mimic the same communication back and forth from my custom java client prototype and was able to initialize, attach and set a breakpoint. Thank you very much for the support! |
Beta Was this translation helpful? Give feedback.
I guess I would turn logging on in VS code and see what messages it sends:
https://github.com/microsoft/debugpy/wiki/Enable-debugger-logs
I'm not sure where it sends the access token. Enabling those debugger logs can also be done in your scenario, then debugpy (and pydevd) should output more information.