I am currently troubleshooting a $http issue in our application. When I step into $http.get, the debugger does not display the values of any AngularJS local variables. Hovering over them shows nothing and right-clicking 'Evaluate in console' throws an Uncaught ReferenceError: url is not defined.
Is there a way to view variable values within AngularJS during debugging?
Thank you.
[Edit for Bruno] I've identified where context is lost in the code (angular.js (1.4.8)):
function createShortMethods(names) {
forEach(arguments, function(name) {
$http[name] = function(url, config) {
return $http(extend({}, config || {}, {
method: name,
url: url
}));
};
});
}
When stepping into $http.get as mentioned above, neither url nor config have values in the debugger. However, url likely has a value since the REST API is accessed over the network.
I attempted to use Batarang, but it does not seem to be compatible with Angular 1.4.8.
[Update] It appears that this issue is related to Angular's strict mode usage. I will need to find a workaround for this.
Thanks to everyone for their assistance and insights.