Comments (5)
You could also try naming your $watch functions, eg:
scope.$watch(function watchThat() {
return that();
}, function whenThatChanges(newValue, oldValue) {
});
Batarang will probably give you the function names.
from batarang.
Since Coffeescript does not allow compiling named functions as suggested by ajoslin, I also would like to see functionality allowing me to click on a function in the performance tab and be taken to the Sources (not Resources) tab to view the line/function in question. Similar to functionality when you click on something like "script.js:10" in the console after doing a console.log.
from batarang.
Great ideas, guys. I'm looking into all of those things now.
I'm not entirely sure how possible it is to get the line number of a function declaration in Chrome. I found this interesting method to get line numbers by throwing exceptions, but that seems a bit hackish and would require extensive instrumentation.
from batarang.
Update: when using the Batarang, it's best to use the un-minified version of AngularJS, which has more instructive watch function names that Batarang knows how to display.
I'm considering including a mapping of the minified name to a useful, debug-able name in another version of Angular, but such a mapping would need to be created for each and every version of AngularJS (which is tedious to maintain).
from batarang.
Added a note to the FAQ: https://github.com/angular/angularjs-batarang/blob/master/FAQ.md
I think in the long term, it would be interesting to incorporate sourcemaps for debugging coffeescript/minified apps. If someone needs/wants such a feature, please file a new issue.
Closing this one.
from batarang.
Related Issues (20)
- HIPAA Compliant? HOT 1
- Using batarang on offline environment HOT 1
- Elements -> $scope shows "Maximum call stack size exceeded" HOT 8
- Better Performance Docs HOT 1
- Not working on Chrome Beta (53+) HOT 1
- Batarang not working in latest version of Chrome HOT 1
- Batarang not working with Chrome Version 53.0.2785.143 (64-bit)? HOT 2
- Switching between scopes using arrows
- angular 1.6.3 breaks batarang HOT 8
- Please build a Release 0.10.8. from current HEAD HOT 1
- 0.10.8 broken HOT 5
- isUndefined is not a function HOT 1
- Failed to instantiate module ngHintModules HOT 3
- Blank screen in AngularJS tab in Developer Tools HOT 7
- expand but not collapse HOT 2
- my chrome cannot use ,chrome version 版本 62.0.3202.94(正式版本) (64 位)
- Firefox support HOT 5
- Angular js batarang enable option is disabled HOT 1
- In chrome devlopment tools window AngularJS tab shows blank window HOT 13
- Does not work anymore? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batarang.