The functionality you're looking for is provided by npm-link that allows you to establish a symbolic link to the source code of a package and so you can debug without going crazy. (This article in English is very interesting: npm link: developing your own npm modules without tears )
The way to use it in your case would be the following:
- In each of the subprojects you execute
npm link
- In the main project
npm link subproyecto1
... npm link subproyectoN
I've done a test with Visual Studio 2015 creating a solution with two projects
nodejs-projectdeps
|- nodejs-projectdeps-main
|- nodejs-projectdeps-module1
package.json file of nodejs-projectdeps-main
{
"name": "nodejs-projectdeps-main",
"version": "0.0.0",
"description": "nodejs-projectdeps-main",
"main": "app.js",
"dependencies": {
"azure": "^0.10.6",
"nodejs-projectdeps-module1": "0.0.0"
}
}
package.json file of nodejs-projectdeps-module1
{
"name": "nodejs-projectdeps-module1",
"version": "0.0.0",
"description": "nodejs-projectdeps-module1",
"main": "app.js",
"dependencies": {
"dockerctl": "0.0.0"
}
}
Then I have executed npm link
in the project portfolio nodejs-projectdeps-module1
with the following result:
C:\Users\...\npm\node_modules\nodejs-projectdeps-module1
-> C:\src\nodejs-projectdeps\nodejs-projectdeps-module1
Then I have executed npm link nodejs-projectdeps-module1
in the project folder nodejs-projectdeps-main
and the result has been:
C:\src\nodejs-projectdeps-main\node_modules\nodejs-projectdeps-module1
-> C:\Users\...\npm\node_modules\nodejs-projectdeps-module1
-> C:\src\nodejs-projectdeps\nodejs-projectdeps-module1
This is how the solution is in Visual Studio 2015 showing the dependencies between packages:
Update : The source code of the tests I have done is published in GitHub