Debugging JSONForms code

Hello everyone,

I’m back at coding with JSONForms and given the highly dynamic nature of the library it is sometimes quite hard to understand what’s happening (when its not doing what I want).

Unfortunately running a debugger through the code just sends me into some kind of header file with no source code to debug.

Is there a way to have my debugger run through the source code when using the lib ? If not what are the available tools to help me understand better how the lib internals are working (apart from reading source code on github) ?

PS : I’m using the debugguer inside VSCode, ideally I would like it work there, but any other option would still be of interest.

Thanks

Hi @Jojain,

We bundle our source maps with each release, so it can be debugged like any other library too.

For example to debug JSON Forms in the jsonforms-react-seed you need to:

Then you can already debug the JSON Forms sources in the dev server.

To debug in VS Code, set breakpoints in node_modules/@jsonforms source files and use a standard VS code launch configuration like:

{
  "type": "chrome",
  "request": "launch",
  "name": "Launch Chrome",
  "url": "http://localhost:3000",
  "webRoot": "${workspaceFolder}"
}

Oh thank you very much, I’m not a JS dev so I don’t really know how the debugging process in JS works.
I’ll check that out thanks again :slight_smile:

1 Like