WebStorm: Strange breakpoint behavior Follow
Hi,
I'm using WebStorm v9.0.3 under Yosemite 10.10.2. I am trying to debug the following code:
function findSolution(target) {
function find(start, history) {
if (start == target)
return history;
else if (start > target)
return null;
else
return find(start + 5, "(" + history + " + 5)") ||
find(start * 3, "(" + history + " * 3)");
}
return find(1, "1");
}
var s = findSolution(13); // breakpoint is set on this line
console.log(s);
When I execute this under the debugger the breakpoint is never hit. If I, instead, set the breakpoint on the console.log(...) line it does fire as I expect.
Am I missing something obvious here?
Thanks!
CS
Please sign in to leave a comment.
Logged as https://youtrack.jetbrains.com/issue/WEB-15320.
You can move var declaration to the top of the file or split declaration and definition to get breakpoint working