angularjs $log - show line number

angularjs, google-chrome, javascript

Solution

In Chrome there is a feature called Blackboxing. You can use it to exclude / bypass (library) sources from your debug sessions or development workflow.

So if you blackbox angular the internals of the $log service get bypassed and the console prints the correct line number!

https://developer.chrome.com/devtools/docs/blackboxing

Problem

I use angularjs $log in chrome, but it shows the line like: `angular.js:9037`. I want to show the line number where I call this method. (Show my js name and the correct line). Does anyone know how to do it? Angular doesn't have this feature.

Original source

Related problems