berstend / node-safe

🤠 Make using Node.js safe again with Deno-like permissions
https://node-safe.com
205 stars 8 forks source link

Better support of Webstorm use case #7

Open dmiwell opened 2 years ago

dmiwell commented 2 years ago

Hi.

Thanks for the lib!

I've tried to setup run script inside Webstorm and the best I was able to achieve is with the following:

img

In factWwebstorm runs the following command:

~/.nvm/versions/node/v16.13.0/bin/node-safe ~/.nvm/versions/node/v16.13.0/lib/node_modules/npm/bin/npm-cli.js run start:dev --scripts-prepend-node-path=auto

Sandbox is recognized and works from node section config, but scripts are ignored. So it seems it does not recognized that run was npm run, since it does it in own way to be able to attach to process to debug.

Is there a way to fix this issue? Or it should be fixed in node-safe scripts.

Also just wondering, is it possible to configure debug scripts in VScode as well. It completely ignores node-safe setup on my end and just run pure node and npm from nvm