0

How do I go about Node --inspect Debbuging Solid Start server-side functions? I don't know what entry to use or the correct settings.

It's hard to use the console log all the time.

Typically I want to debug things like createServerAction$

snnsnn
  • 10,486
  • 4
  • 39
  • 44
Nikos
  • 7,295
  • 7
  • 52
  • 88

1 Answers1

0

You need to attach a debugger first, like any other NodeJS application then use debugger or other debugging keywords:

How to attach a debugger varies, say you are using VSCode editor, the simplest way would be:

  1. Open the terminal window.
  2. Create a Debug Terminal by pressing +⌄ icon and selecting Javascript Debug Terminal.
  3. Start your application like you normally do. For solid start templates, it is npm run dev.
  4. Locate the code you want to debug and type debugger.
  5. Refresh your window if the code snippet is already executed when you add the debugger keyword.

There are alternative ways to add which you an read about it here:

snnsnn
  • 10,486
  • 4
  • 39
  • 44