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
Recommended debugging techniques #25
Comments
I try to limit debugging via Curassow, I'd usually try and write a test that has the same behaviour and attach lldb to the test runner. As for problems in your application, you can just hit the Nest callback directly, I was planning to write some convenience testing functions to make that easier. |
If you could just add two lines on how one can do that in the readme I'd consider that enough for what I was going for here :) |
You can use $ make run-tests
$ lldb ./run-tests
< add all your breakpoints etc here>
(lldb) r
Process 50884 launched: './run-tests' (x86_64)
-> HTTPParser
-> can parse a HTTP request body
-> reads the message body when Content-Length is present
-> throws an error when the client uses bad HTTP syntax
-> throws an error when the client uses a bad HTTP version
-> throws an error when the client disconnects before sending an HTTP request
-> throws an error when the client disconnects before sending the entire message body
6 passes and 0 failures
Process 50884 exited with status = 0 (0x00000000)
|
Yeah that's pretty much what I'm doing, thanks! |
Are you trying to debug an issue with Curassow specifically or your application? If there is a bug with Curassow please open an issue and I can take a look. If it's with your application, I'd suggest removing Curassow from the mix completely and testing your application directly [example]. |
No bug in Currasow, I was just debugging my server running on it. Ok thanks |
I was wondering how you approach debugging Curassow (with lldb), since it forks off worker processes at the beginning and lldb doesn't support automatic following of forks.
I found a very tedious way:
attach WORKER_PID
, which is visible when the server startsThis will obviously get untenable as a codebase grows, so I'm wondering what your thoughts on this are.
The text was updated successfully, but these errors were encountered: