Problem with Debugging and Breakpoints in latest Webstorm

I am having problems with the debugger stopping at breakpoints when trying to debug node.js project.  If I set the breakpoint high up in the module chain (ie: 1 or 2 levels down) everything works and breakpoints get hit.  If I set a breakpoint further down in the module chain, the breakpoint never gets hit.  However, if I step through the program with the debugger, it will hit the line that I set for a breakpoint and I can see the breakpoint set.  

Is there anything I can tweak in order to get the debugger to honor these breakpoints further down the code chain?

12 comments

Hi Alex!

Was it working in the same project using previous WebStorm version?

Also, can you bring some more details? Call stack? Files paths? Or even a sample project maybe?

Thanks!
Kirill

0

Not sure about it working in previous version.  I was only using the old version for a couple of days before upgrading, so I don't really remember.  I can't send the code for the existing project, but I'll see if I can recreate with some other code.  

0

How easy is it to go backwards from 5.0?  Can I just reinstall or should I uninstall and reinstall?  I think the easiest thing right now is to first confirm whether this occured in the 4x version first.

Thanks,
Alex

0

I tried both 4.02 and 4.03 and same problem.  I was able to reduce the code to its bare essence and it still exhibts the same behaviour so I have packaged it up and included in this reponse.  It requires the restify api, but other than that, it does not have any other dependencies.  The file that does not break is the SqlBuilders.js file.  Basically, make a post call to localhost:8081/account to trigger.



Alex



Attachment(s):
TestForDebugger.zip
0

Thanks Alex, we will look at it and get back to you shortly.

Kirill

0

I am having all kinds of debugging problems with the 5.0.1 build but cannot say it's changed because the debugging would stop working in 4.0.3 as well.

Most recent is that the debugger's operation seems to be "reversed" in a way. When I first RUN in debug mode, all my HTML divs show up (in Firefox) as though it was IE which doesn't understand the 'hidden' attribute, and the browser shows its 'working' state spinner but nothing changes. Then, when I hit the STOP button, it's as though my code executes outside of the debugger. No console messages show and no breakpoints break, but the code seems to execute and the HTML is updated. While the code is executing, the debugger window returns to its 'ready' state.

There have been numerous times when debugger breakpoints do not work at all, and I have no clue as to what uncaught syntax errors are doing this.

I have been programming distributed systems for 30+ years but JavaScript is not my most comfortable language, to say the least. I love your WS IDE when it works and I know RubyMine is truly awesome, so I'm willing to work with you guys on improving this product. I have WI-13423 filed that has a simple case of the most glaring problem I've seen attached. :D

0

Kiril, just wanted to check in and see if there was any movement on trying to fix this issue.  I love the IDE, but the lack of proper breakpointing is becomming  a major downer as my project becomes larger.  I've now got console.log statements littered everywhere through my codebase ;)

Thanks,
Alex

0

Alex, they supported me in learning how to use their remote debugging features and it solved my problem. It's not quite user friendly yet but it does work and I'm assured that they're working hard both to improve it and document it more thouroughly. The "inside out" problem went away when I completely flushed the browser using shift-refresh and clear cache in the preferences.

0

Could you possibly provide some more information on what needs to be done or links to any documentation?  The lack of debugging is driving me crazy at this point.  When you say clear out your browser cache, how does that affect an app that is not being called by a browser, or does all debugging need to occur via chrome or other webkit browser instead of through the webstorm app itself?  

0

Sorry guys, there's end of the working day here in St. Petersburg, all my colleagues have gone home. I will respond tomorrow morning.

What you can do now is to try the latest EAP build.

Kirill

0

I will investigate your problem ASAP. You don't need to configure remote mapping (as Donald Wilde) — it is not needed for nodejs debugging. But please try latest EAP (major fix was pushed, may be related http://youtrack.jetbrains.com/issue/WEB-2308).

0

Hmmm, so far so good.  Just installed and its breaking where I ask it to, even in deeply nested async processes.  I'll have a chance to test out more over the next several days and let you know if it does indeed fix the issues.  Thanks!

0

Please sign in to leave a comment.