Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS watch - unable to set breakpoint in chrome using devtools workspaces

Does the watch service create a proxy of the original function ?

$scope.$watch('query', doSearch, true);

where :

doSearch = function(query) {
  alert("breakpoint not working");
  // stuff
}

The alert gets shown, but if I add a breakpoint to the code using chrome debugger, its does not break at all. Whereas other break points in non-watched javascript functions work as normal.

Update : The break point works fine when I don't use the workspaces feature of chrome dev tools.

like image 491
NimChimpsky Avatar asked Nov 11 '22 06:11

NimChimpsky


1 Answers

Try using the debugger command..
For me it works when regular breakpoints to work on chrome.

like image 80
Ephi Gabay Avatar answered Nov 14 '22 22:11

Ephi Gabay