Inspect flag to debug

Add an icon to start an additional process with inspect flag.
Now that we are fiddling with extensibility we will probably need to debug more than once our own code.

I normally handle this via terminal but it would help having a direct access from UI and running on a different port(3001?).

For local server this is straighforward.
For docker, additionally the debug port would need to be forwarded.

Not sure I fully understand what you want to debug? The UI or so?

Our custom SC actions.

Yesterday while building the Nano ID extension I had to launch twice a new node.js process with the inspect flag to check a few things in my module code.

If this could be added as a shortcut it would be great. An icon to launch a second node process in a different port with the inspect flag. It could also open an instance of chrome with the inspect flag too.

Maybe @patrick can advise how to do debugging on your own modules.

I think I am confusing you. I know how to debug nodejs apps :slight_smile:

I am just suggesting a UI QoL change so that clicking an icon in Wappler UI spins of a new local server with another port with inspect flag and possibly launch a new chrome instance with inspect flag too.

Yes you are confusing me :slight_smile:

Why would you want to do all that while you can just open the server action in the browser and inspects its output?

And in the meantime watch the messages printed out in the output panel in Wappler…

Because the console gives limited output for errors. I can’t see the contents of variables, scopes, etc.
Also, the need to set breakpoints in our custom code or even in the npm module being used.

ooh you can use the chrome devtools for that :slight_smile:

we just need to pass the --inspect option.

maybe always start the local dev server with the --inspect option so that you just need to call chrome://inspect to open the devtools (there is even a shortcut for it - maybe we can add an icon for the devtools :slight_smile: )

Exactly that :slight_smile:

Should have mentioned the name chrome devtools for nodejs 4 posts ago :joy:

1 Like