Dear @himansh,
The easiest option to debug code is to run it directly from browser's console. First, you need to add variables that you want to work with to the global window, with the following lines in JS editor:
window.fd = fd;
window.$ = $;
window.pnp = pnp;
Then, run any code pieces in browser's console without any problems. The only issue is that you won't be able to run them inside the events, the form will already be loaded. Most of the time, you can just wrap the code after testing inside fd.spRendered() event and add ready events for the complex fields that need to load, and you'll be good.
If you absolutely have to debug code from JS editor, the debugger does work - Debugging Custom JS
You simply need to open the console, before opening a form, and it will auto-activate. The problem is that you'll also go line after line via our code as well, and it's not readable.