-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebStorm debugger is extremely slow to start w/ Node.js 5.0.0 #3875
Comments
+1, confirmed here as well. |
Is there reason to believe it's a node.js issue? IIRC, last time it was weak interaction between V8 and WebStorm. |
I don't experience any problem during fixing https://youtrack.jetbrains.com/issue/WEB-18853 I will check again ASAP, but, may be, it is already fixed in the not yet published WebStorm 11.0.2. |
Anyone able to try this patch to see whether it fixes anything? https://codereview.chromium.org/1454673002/ |
@bnoordhuis You're right, but people will experience this issue when use WebStorm to debug their Node.js 5.0.0 applications. So, I believe that it's better to track there as well, to prevent it arise in this list over and over again. |
@develar I'm running the Webstorm 11.0.2 EAP, which includes WEB-18853. It fixes the debugger not running at all, but I still have a 30s+ wait for the debugger to launch and connect when running Node 5.0. |
This appears to be a debugger issue, not Webstorm specific. I get a similar delayed startup time when loading For context, I'm also transpiling using |
It would be nice if there was a reduced test case that could be generated from these debugger startup paths. That would be useful in verifying issues like this. |
I'll try to put something together. I'm not sure how reduced it can be since the slowness of the startup time seems to be dependent on the number of modules loaded in the application code e.g. If I create a trivial application the debugger session starts instantly, but as you start loading modules the load time grows ... Something worse than linearly... Cheers,
|
Problem for me — that I don't have complex NodeJS app to feel the difference. Can somebody send me (attach to https://youtrack.jetbrains.com/issue/WEB-19117 and set visibility "jetbrains-team") test project? Is startup slow in case of sample express project ("Node.js Express App" template)? |
Reproduced — v5.1 is dramatically slow compare to v4.2.2. |
Please note that someone is reporting this is also occurring with node-inspector. |
@yangguo-chromium I applied https://codereview.chromium.org/1454673002/ patch to nodejs 5.x sources —doesn't fix the issue. |
More on track: Visual Studio Code is not affected, the integrated debugger is fast as hell (it attaches its debugger in the same way that node-inspector does). |
Not sure if it helps anybody, but for me it worked when trying to debug node application through WebStorm. https://www.linangran.com/?p=569 |
@christeiro Don't forget — if you "Uncheck ‘js.debugger.v8.use.any.breakpoint’.", you cannot debug sourcemap backed scripts anymore. But – since WebStorm 11.0.2 js.debugger.v8.use.any.breakpoint doesn't slowdown debug anymore in node 4.x (only 4.x). I really hope that in the next 5.x release my pull request will be merged — #4231 (thanks to @yangguo-chromium, change in the V8 master already). |
Are there ANY other workaround for this issue other than js.debugger.v8.use.any.breakpoint? (Which as pointed out makes you unable to debug sourcemapped files) This is quite a serious issue for anyone doing development using the 5.x version. 45sec++ to start a debugging session isn't a very effective working environment |
Just trying to understand the problem: does WebStorm set many break points upon startup? |
@yangguo-chromium Yes, all breakpoints + any-breakpoint to debug sourcemap-backed script. But issue is reproduced also if only one breakpoint exists (any-breakpoint). In my case I don't see any notable difference for simple applications, but if want to debug gulp scripts... it is really slow compared to nodejs v4. |
Using WebStorm 11 and node 5.4.1, I can't even get the debugger to work. It will connect, then when it gets to the breakpoint node will break but webstorm will never pick up that node is waiting for it. |
tested on node 5.5.0 + phpstorm 10.0.3 debugging is slow as hell too. |
Trainwreck for me. By the time my main app starts, it times out due to internal watchdogs. WTF? |
Resolved for me by disabling the js.debugger.v8.use.any.breakpoint option in the Registry again as detailed in: However, does have compatibility issues with certain breakpoints. |
Nitpicking, but keep in mind that the @AlexDobeck is not a resolution but at most a temporarily workaround for those who are not transpiling. It will break sourcemap support in most cases, thus it isn't a real solution if you are still transpiling somehow (e.g. async/await fans). Personally, we are working around this by keeping But again, this remains an extremely annoying issue, it's very costly in terms of dev or tooling-time. Assuming this is a similar issue rooted in V8, I'm a bit puzzled as to how this kind of regression could take place. Could the next kind soul who submits a PR for this on V8 also accompany this with relevant tests? |
@hilkeheremans Well, we have made some changes to speed up — #4231 is not a real fix, but helps a bit (only V8 can fix this regression again (it was fixed some time ago, but broken again))), but 2 months passed and it is not yet merged. |
+1 I have the same problem in both version 11 and EAM version 12 |
Well... If V8 doesn't want to fix it... We can implement another solution to not rely on V8. But this solution will be not generic. So I ask you — please send me (you can attach it to the https://youtrack.jetbrains.com/issue/WEB-19117 and set visibility to "idea-developers") test project where issue is reproducible. Also, anyone is interested to try custom build with merged #4231 ? |
Hi, it's not that V8 is not willing to fix this rather than having no test case to go by. I suspect that this issue happens because Webstorm sets a lot of break points at start up, but have not gotten any confirmation so far. Without a test case there is no way for me to fix this other than trying something, then ask and wait for feedback, which happened once in this thread already. The turn-around time sucks. A test case would also catch future regressions. Besides that, V8 is currently moving towards using an interpreter for debugging. I expect this problem to go away once we do the switch, because recompiling is then no longer necessary. So I'd be very grateful if anyone can provide a concise test case rather than "startup is slow". Thanks. Yang |
@hashseed Please see #3875 (comment) I think, it is the same regression again — any breakpoint. Not "because Webstorm sets a lot of break points at start up", but only because Webstorm sets any breakpoint (it is not a new functionality, since 2013).
Please see https://youtrack.jetbrains.com/issue/WEB-19117#comment=27-1287695 |
I actually think it might be a new regression due to a new cause. The old regression site did not change. I'm not familiar with the nodejs debugging workflow, and don't use Webstorm at all. Would it be very difficult to create a standalone test case that runs on d8? |
Confirming in WS 11.0.3. Running on a 6700K CPU still takes about 10-15 seconds to start the app and reach first breakpoint (a plain run of the app has a bootstrap time of about 800ms). |
I am not sure what Node.js can do about this issue given that there is no test case (without external dependencies). 'WebStorm is slow' is not a test-case. I think this bug belongs on the WebStorm repository. If you think this is a problem in Node.js, please provide a Node.js test-case without external dependencies. If you think this is a problem in V8, please open a bug against V8 (be prepared to provide a test-case that works on |
@ofrobots is right, this is most likely an issue with node-inspector (which WS uses by default, to the best of my knowledge). See e.g. node-inspector/node-inspector#820 |
I'll close the issue. |
@bnoordhuis Sorry for reminder, but it will be also cool to merge #4231 to eliminate v5 regression. |
Here we go again. Looks like our friend is back again with Node.js 5.0.0. Confirmed w/ WebStorm 11.0.1 + Node.js 5.0.0. Reported there: https://youtrack.jetbrains.com/issue/WEB-19117
@develar I'm opening that there too, it might caused by a new v8 stuff.
The text was updated successfully, but these errors were encountered: