PhpStorm can't debug namespaced JavaScript functions?

I'm trying to use PhpStorm to debug JavaScript for the first time and it appears to me that PhpStorm cannot debug namespaced functions.

I'm referring to something like this:

var namespace = {};

namespace.foo = function () {
    var bar = 'foobar';
}

namespace.bar = function() {
    var foo = 'barfoo';
}


When I set a breakpoint on the "var bar = 'foobar';" line in the first function, the debugger breaks on the next function line "namespace.bar = function() {".

I've played around and cannot get any different behavior, so it appears to me that PhpStorm cannot debug namespaced functions. Is that correct?

1 comment
Comment actions Permalink

Works fine to me using your example. Anyway, seems you have faced the known issue: http://youtrack.jetbrains.com/issue/WEB-6659.
This is actually the Chrome APi problem - see http://code.google.com/p/chromium/issues/detail?id=304150

0

Please sign in to leave a comment.