1

For debugging purposes I would like to access my Angular module functions client-side in the console.

Is there a way to access the Angular $scope inside the console of a browser?

Cib
  • 33
  • 4

2 Answers2

2

If you put a breakpoint, you can examinate the scope value in this execution moment

Also you can install the Batarang extension for Chrome, and you will get direct access to your $scope s in the console browser

https://chrome.google.com/webstore/detail/angularjs-batarang-stable/niopocochgahfkiccpjmmpchncjoapek

0

Open developer tools window (F12) in chrome --> go to sources tab --> find the js file where your specific function is in --> click on the line number in front to set the breakpoint --> press refresh(F5) in browser, and your browser will stop at the breakpoint.

Then type in the console en you can check the variables/objects witch are in scope of the specific javascript function

Doek
  • 161
  • 9