How to debug the bpmn-js from an html?

Hi, I’m trying to debug a viewer bpmn-js using either WebStorm or Node.js
tools for Visual Studio and I have the same error when the debugger is
passing by min-dom

Min-dom requires “domify” and inside, in the index.js there is a

var div = document.createElement('div');

The error is that “document” is not recognized (obvious) because my test starts from a .js and not from a .html

It is possible debug the bpmn-js from a html? I want to see the changes happening directly in my own webpage.

Thank you

bpmn-js is a toolkit that works in the browser. As such, it requires a browser-like environment. If you want to run it from NodeJS you need something like jsdom to create a fake browser environment.

I assume this is not your use case though. If you would like to simply debug it, create an HTML page, bootstrap bpmn-js in it and debug the application using your browsers developer tools (F12). Most modern browsers have excellent debugging support.

As far as I know Webstorm integrates with in-browser debugging, too. You’d need to find out how yourself.

Hope this helps!