如何在指令中调试链接函数?

hup*_*seb 6 debugging google-chrome-devtools angularjs angularjs-directive

如何在指令中调试链接函数?

调试器不会debugger;在下面的代码中停止.Chrome中的断点也不起作用.

fessmodule.directive('dummy', function($http) {
  return {
    restrict: 'A',
    template: '',
    link: function(scope, element, attrs) {  
        debugger;
        scope.data = scope.data + " + directive postfix";    
    }
  };
});
Run Code Online (Sandbox Code Playgroud)