-
Notifications
You must be signed in to change notification settings - Fork 383
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
How to debug code inside the RPC server #270
Comments
You can try the python debugger `pdb`. I suspect it won't be the nicest
experience because of long jump across gevent stackfull coroutines.
…On Tue, Dec 24, 2024, 14:25 oren0e ***@***.***> wrote:
Hi,
I would like a way to "attach" to the rpc server and be able to step
through the code that is being run by it in a debugger. How can I do that?
Currently the code that runs in the RPC server is kind of a black box to me
and this makes it hard to debug problems.
Thanks in advance.
—
Reply to this email directly, view it on GitHub
<#270>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDEZMCI5T6R5LFE5VYD2HFOEJAVCNFSM6AAAAABUEXAHRGVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42TOOBQGE3TEMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@bombela I know, I have tried to debug with pdb (the normal debugger I usually use) but the problem is that eventually you get to a |
I might have miss understood. At the risk of stating the obvious, you must
run the debug on the server. Likely with a breakpoint of the handler of
interest.
…On Tue, Dec 24, 2024, 23:06 oren0e ***@***.***> wrote:
@bombela <https://github.com/bombela> I know, I have tried to debug with
pdb (the normal debugger I usually use) but the problem is that eventually
you get to a .call() method or something like that for the rpc server and
that's it.
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDFP6QWVXNQVP7IFV232HHLIDAVCNFSM6AAAAABUEXAHRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRRGQ3DSNZUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@bombela of course. The setup is that on the same server there is a code that executes and then calls to the rpc server which is on the same server, just a different process on a different port. My question is how to attach to that port and be able to debug properly. |
I meant to run the debugger on the python process receiving calls from the
network, and executing the functions/handlers.
If I understood correctly, in your case you would want to run PDB on the
RPC server.
I don't think PDB can attach. But you can surely start the process under
PDB at least. https://docs.python.org/3/library/pdb.html
…On Wed, Jan 1, 2025, 20:42 oren0e ***@***.***> wrote:
@bombela <https://github.com/bombela> of course. The setup is that on the
same server there is a code that executes and then calls to the rpc server
which is on the same server, just a different process on a different port.
My question is how to attach to that port and be able to debug properly.
—
Reply to this email directly, view it on GitHub
<#270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDEPFBIU3SHQGJRVGZL2IRAMBAVCNFSM6AAAAABUEXAHRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGEZDIMJQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi,
I would like a way to "attach" to the rpc server and be able to step through the code that is being run by it in a debugger. How can I do that? Currently the code that runs in the RPC server is kind of a black box to me and this makes it hard to debug problems.
Thanks in advance.
The text was updated successfully, but these errors were encountered: