Thank you so much Anjali Chauhan π
You just need to understand and apply the standard ways of debugging in that language
Reproduce the issue π
Adding logs, this is probably the first thing you would want to try π
Adding breakpoints, ex in Javascript you can do via browser dev tools in the sources panel or adding debugger in that line where you want to stop execution and then use the dev tools to control/trace the code execution