Debugging custom modules/nodes/credentials

I’m new to TS and the n8n codebase. I’m creating some custom modules with custom nodes and credentials.

Sometimes some errors occur and it’s really hard to debug them because I don’t know how to debug them. For instance, I don’t even know if they were properly loaded.

So starting from the basics, is there a way to check all the modules loaded, and the nodes and credentials they loaded?

Further on, are there any tips on how to debug them? Is it possible to use something like the VS Code debugger to debug it?