-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement logging for debug adapter clients #45
Conversation
2d44af1
to
5c67eee
Compare
5c67eee
to
4ee71ad
Compare
I think should consider to always enable RPC messages, because for connecting to a debug adapter the initial request is crucial. Right now we cannot see them, because we did not enable RPC messages yet. |
I also think we should consider refactoring how we pass around the transport params and IO params, maybe we should move the connect tcp/stdio methods to the transport layer. So each debug adapter does not have to care about how they should return the correct transport + log IO params. |
This looks good! Maybe it would be beneficial to use create a Model instead of using Mutex to store the log messages. That why it would be more inline with how the rest of the Zed code base handles stuff. However, that's not a blocking issue and can be changed in the future. |
Thanks for the input! I'll make the changes and let you know when it's finished.
I think that's a good idea. Do you want me to make this change in my branch?
Just so I'm sure I got it right, we should get rid of the option to enable/disable RPC logs, right? Or should we enable it by default and allow people to disable it? I think if we're going to default to it being enabled we can just get rid of the toggle altogether. |
…or logging. So not each debug adapters have to map the AdapterLogIO fields. I also removed some specific when has logs from the client, because the client is not responsible for that. Removed an not needed/duplicated dependency Fix formatting & clippy This cleans up the way we pass through the input and output readers for logging. So not each debug adapters have to map the AdapterLogIO fields. I also removed some specific when has logs from the client, because the client is not responsible for that. Removed an not needed/duplicated dependency Fix formatting & clippy
73c8e07
to
211fd50
Compare
Co-Authored-By: Anthony Eid <hello@anthonyeid.me>
Previously, RPC messages were only stored when explicitly enabled, which occurred after the client was already running. This approach prevented debugging of requests sent during the initial connection period. By always enabling RPC messages, we ensure that all requests, including those during the connection phase, are captured and available for debugging purposes. This could help use debug when someone has troble getting a debug starting. This improvement could be particularly helpful in debugging scenarios where users encounter issues during the initial connection or startup phase of their debugging sessions.
Thanks a lot🔥 |
debugger-log-view.mov