我目前正在尝试使用Node.JS,并将Visual Studio Community与Node.js工具一起用作主要IDE。
然后点击F5,我的Express应用程序将启动,我会看到这个漂亮的调试窗口:
但是,如果使用来安装Sails.js,则npm -g install sails
在测试Sail.js应用程序(如果我在Visual Studio中创建一个)或Express应用程序中都不再看到此调试窗口。
我的应用程序将按预期启动,除了无法再看到调试窗口。
仅在执行以下操作时,调试窗口才会返回:
npm -g uninstall sails
How do I get debug window if I have Sails installed? I'd like to have it for both Express and Sails applications.
Ran into a similar issue of running Sails application inside Visual Studio. Here's how I got my project properly running in Visual Studio, in case any stumbles on that question.
In another folder outside of your project initialize your sails app (if you haven't already), e.g. sails create appName. If you already know your API controllers/models, it's a good idea to create them right now. If not, you'll have to do it manually rather than using sails generate api
重要信息:在Sails项目文件夹中,删除node_modules,在我的情况下,现有的节点模块使VS npm偏离了轨道
希望能帮助到你。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句