Open ossdhaval opened 1 year ago
I had added some documentation regarding this here: https://github.com/JanssenProject/jans/blob/main/docs/admin/developer/interception-scripts-debug.md
Hi @nynymike This is untested currently - https://github.com/maduvena/jans-docs/wiki/Debugging-a-custom-script It is debug option for CE I have used it in my earlier days in Gluu, however I just like the idea of putting print statements in the code and have done so in all these days.
if REMOTE_DEBUG:
pydevd.settrace('localhost', port=5678, stdoutToServer=True, stderrToServer=True)
Same is the case with remote debugging for java programs as well. (Local debugging is very smooth for java)
I think we need both... isn't the advantage of remote debugging that you can see the object instances, which can help you understand what data is available in the context?
In my experience, the performance can vary because of a number of factors. For example, when I'm running the AS on a local VM, remote debugging through Eclipse is almost as responsive as local debugging. On the other hand, when remote debugging the AS running on a remote server, remote debugging can take several seconds for each round trip on breakpoints, steps and so on. This makes the experience very obtrusive. Regarding remote debugging vs print statements, we may want to observe objects outside the scope of the custom script, in which case we would not be able to use print statements.
So we have two documents, one for remote debugging on VM install (from @maduvena ) and one for CN install (from @SafinWasi). Both are in a draft state and need to be solidified. I'll create two separate issues (tracked under the current issue) to take these to completion.
I think there's a bit of confusion here. I did not write the guide for remote debugging on Cloud Native install. That was by @maduvena. I simply added the steps for enabling remote debugging on the jans-auth Java process. I'm unfamiliar with the CN setup as I always use VM install myself CC @ossdhaval
@SafinWasi Sure. No problems.
Let's do this step-by-step. Let's first get the instructions for debugging on VM installation right. Then we will review instructions for CN. Most steps between VM and CN should be common barring instructions to tackle infra.
Describe the bug
As per below feedback, received from @nynymike. @SafinWasi can add more about his experience with this effort.