Debugging Volumio 2 Node.js Code with Webstorm

I’m new to Volumio development, as well as working with node.js and the Webstorm IDE. It took me a while to figure out how to create an interactive debugging environment using Webstorm on my Mac, networked to Volumio 2 running on a Raspberry Pi 3, so I created this short video to show how I got it to work:

A few issues with Webstorm getting confused over all of the various index.js files, but overall it’s a pretty powerful interactive debugging environment.

Nice video skikirkwood!!

Jim, awesome! Didn’t see it before! I will stick into documentation

I followed the video - it was a great help, thanks.

If I run the SCP cmd to copy the /data folder, the debbuger stopped in the wrong files, so I figured that the local source is not in sync with the remote.

So I copied the /volumio folder instead

scp -r volumio@volumio.local:/volumio .

And is worked, but now my question is how do I debug the /data/plugin folder?

Almost all of my debugging was done on the Spotify plugin-in (in /data/plugins/…) and Webstorm would occasionally get confused due to the multiple index.js files. To get around that I would not stop the debugger on the first line of execution, but instead let Volumio boot up and then set breakpoints.

My Webstorm subscription recently expired, so when I renew it I’ll take a look and see if I can pass on any other tips.

Is it not possible to get the Volumio backend to run locally on the Mac? It’s just NodeJS, or does it use some native libraries or something that’s not available? I want to work on it during my commute, but it’s a pain to have to drag around a Pi and power pack.

Dunno how current this is, but … l-machines

maybe this can help you :