How do I debug and test the IRIS OAuth server?

Primary tabs

OAuth server to be deployed on the IRIS learning cloud platform. Clients - one on the other instance of the learning IRIS server, the other client locally on my computer in the container docker.

Both clients get a seemingly correct link (through ##class(%SYS.OAuth2.Authorization).GetAuthorizationCodeEndpoint()) to the login request form:  

https://52773b-62955584.labs.learning.intersystems.com/oauth2/authorize?response_type=code&client_id=nHCv5A-u_5T1YAwk_tJ7xpi1ky-s2AnRQMaL6YHsUgU&redirect_uri=https%3A//52773b-99792125.labs.learning.intersystems.com/csp/sys/oauth2/OAuth2.Response.cls&scope=scope1&state=lXsMt6yckoPEv-HNdWZptXDxNS0


And in the answer from a server the empty answer instead of the form of a login comes.

If to break the reference to authentication (to remove an id of the client) the OAuth server works and something handles: "Unexpected request - no client_id".

How do you recommend debugging in this context?

Answers

Have you looked at @Daniel Kutac series of articles about OAuth2? In part 3 he mentioned about debugging. Kind of like this should help you.

set ^%ISCLOG=5
set ^%ISCLOG("Category","OAuth2")=5
set ^%ISCLOG("Category","OAuth2Server")=5

Dimitry, thank you for the tip! 
Now I see all the details when there are bugs.

But the question remains relevant. The server does not recognize the request of my client erroneous and thus gives out an empty answer. How to do tracing of calls for system classes if all goes "ok"?

At replacement inside of inquiry in parametres - references slash "/" on its code %2F, the OAuth server began to answer queries.

I did a test in another application. Error processing parameters-links within requests repeats itself.

Maybe the reason in incorrect processing of inquiries containing links with slashes in a system class %CSP.Request?