Its pretty simple to do it. But make sure you use express in your server.js. For reference, PFA link from medium site below.
generally you run using node server.js right?? now make it node –inspect server.js
node –inspect –debug-brk server.js
then automatically chrome dev tools will open and you put some breakpoints to debug.
If devtools not opened automatically,
and click on inspect on server.js like shown below.