Suppose we have a variable defined as
$scope.name = 'myName'
alert 'this is the variable in Scope': name;
See Below link for your solution:
Also Stackoverflow link which have same type of discussion: How to access the $scope variable in browser's console using AngularJS?