2

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?

2
  • You can install Chrome extension ng-inspector for AngularJS. Commented Dec 16, 2015 at 20:56
  • Here's a good read on the subject: blog.ionic.io/angularjs-console Commented Dec 16, 2015 at 21:04

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.