[英]Debug JavaScript code in Visual Studio bundled with WebPack
I'm new to JS development and experience issues with debugging JS code in Visual Studio 2013. JS part of our web app is bundled into a single app.bundle.js file by WebPack, this file is automatically updated everytime any js file changes (we use special watch script which uses npm). 我是JS开发的新手,在Visual Studio 2013中调试JS代码时遇到问题。Web应用程序的JS部分由WebPack捆绑到单个app.bundle.js文件中,每当js文件发生更改时,此文件都会自动更新(我们使用使用npm的特殊监视脚本)。
I'm able to debug JS code using Chrome and debugger;
我可以使用Chrome和
debugger;
调试JS代码debugger;
derecitve. derecitve。 It shows correctly mapped file under such kind of paths "webpack:///./Scripts/".
它在此类路径“ webpack:///../Scripts/”下显示了正确映射的文件。 It means that WebPack creates mapping correctly.
这意味着WebPack可以正确创建映射。 But I'd like to debug directly from VS using Call Stack, break points, etc.
但是我想使用调用栈,断点等从VS直接调试。
Any ideas? 有任何想法吗?
Thanks in advance! 提前致谢!
There is aa series of ongoing issues with Debugging webpack bundles Visual Studio. 调试webpack捆绑Visual Studio时存在一系列持续的问题。 Depending on your webpack configuration and your dependency versions, this Webpack plugin may work for you.
根据您的Webpack配置和依赖版本,此Webpack 插件可能适合您。 Be sure to check out the issues where can you see the ongoing conversation.
确保检查出可以在哪里查看正在进行的对话的问题。 If you are doing anything with Babel / ES2015+, you probably will want to upgrade to Visual Studio 2015 for syntax support.
如果您对Babel / ES2015 +做任何事情,您可能需要升级到Visual Studio 2015以获得语法支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.