Hi, is there any way I can debug or set breakpoint...
# ktor
h
Hi, is there any way I can debug or set breakpoints for incoming APIs requests in Ktor? The logs are returning minimal information. Actually I have implemented JWT authentication in ktor and I am getting status code 401(unauthorised) in API response and something similar in logs as well. I am stuck here since long time, how do I get more details on what is causing it?
This problem got fixed. But question still remains how to set breakpoints so that I can debug the incoming API requests
h
What about setting a breakpoint and attach the debugger?
h
Debug Application(instead of run) worked for me. It was somehow not working earlier when I was getting 401 status code. Maybe the code did not reach there. Thanks I am able to debug now.
c
Have you used the Logging plugin?
h
Yes, I have used. It returns detailed logs for some request codes like bad request (400) but for unauthorised (401) there were no details available except one line which said 401 unauthorised
c
I wonder if that's on purpose.
a
@Hitesh Chopra feel free to file an issue if you think that the logger should store more detailed logs for the 401 status code response.
h
@Aleksei Tirman [JB] sure Aleksi. I have raised a feature request for the same.