如何使用WebStorm调试WebPACK中-dev的服务器(在内存中)? [英] How to debug Webpack-dev-server (in memory) with WebStorm?

查看:2138
本文介绍了如何使用WebStorm调试WebPACK中-dev的服务器(在内存中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据WebStorm他们要求我们调试针对dist目录中规定:
 的https://blog.jetbrains.com/webstorm/2015/09/debugging-webpack-applications-in-webstorm/

As per WebStorm they require that we debug against a dist directory as specified in: https://blog.jetbrains.com/webstorm/2015/09/debugging-webpack-applications-in-webstorm/

然而,按照WebPACK中推荐的开发过程中,我们应该运行的WebPack-DEV-服务器,因此其所有在内存中的:

however, as per Webpack recommended development process, we should be running webpack-dev-server, so its all in memory as in:

的WebPack-DEV-服务器-inline -progress -colors -display错误的细节-display缓存-hot -port = 3000

webpack-dev-server –inline –progress –colors –display-error-details –display-cached –hot –port=3000

所以没有dist目录,其中contridicts例子贴出@:的https://blog.jetbrains.com/webstorm/2015/09/debugging-webpack-applications-in-webstorm/

so there is no dist directory, which contridicts examples posted @: https://blog.jetbrains.com/webstorm/2015/09/debugging-webpack-applications-in-webstorm/

有没有办法让的WebPack-DEV-服务器使用DIST DIR所以WebStorm可以映射到它,所以我们可以利用现场调试源地图?

Is there a way to have webpack-dev-server use dist dir so WebStorm can be mapped to it so we can use source maps for live debug?

这FYI是我使用的测试项目:

FYI this is the project I am using to test:

https://github.com/ocombe/ng2-webpack

TX

肖恩

推荐答案

正如你所知,你必须创建源地图分发/产品包,然后使用该在WebStorm调试。就个人而言,我运行噶测试,同时我有的WebPack-DEV-服务器上运行。噶测试可以与调试器上运行,并通常满足我的任何调试的需要,而的WebPack-DEV-服务器提供了我的手工测试,看看我正在做的。

As you know, you will have to create a distribution/production bundle with source maps and then use that for debugging in WebStorm. Personally, I run tests with Karma while I have the webpack-dev-server running. Karma tests can be run with the debugger and that usually satisfies any of my debugging needs, while the webpack-dev-server provides my "manual test" to see how I'm doing.

我想我说什么你的情况......你可以有开发服务器运行的同时,在同一时间,有某种自动化的身材,在准确的同一时间,你可以运行和运行源地图使用的调试器。这可能是密集的,但这样它取决于你的内存和处理能力。

I guess what I'm saying for your case... you can have the dev server running while, at the same time, having some kind of automated build with source maps running at the exact same time which you can run and use the debugger on. This can be intensive though so it depends on your memory and processing power.

这篇关于如何使用WebStorm调试WebPACK中-dev的服务器(在内存中)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆