Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Commit

Permalink
update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Nov 14, 2012
1 parent 6636a6f commit 9d8df86
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 17 deletions.
23 changes: 15 additions & 8 deletions README.md
Expand Up @@ -16,32 +16,39 @@ https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk
Check out [this screencast](http://www.youtube.com/embed/q-7mhcHXSfM) that walks you through the Batarang's features. Check out [this screencast](http://www.youtube.com/embed/q-7mhcHXSfM) that walks you through the Batarang's features.


## Using the Batarang ## Using the Batarang
First, navigate Chrome Canary to the AngularJS application that you want to debug. [Open the Developer Tools](https://developers.google.com/chrome-developer-tools/docs/overview#access). There should be an AngularJS icon. Click on it to open he AngularJS Batarang. First, navigate Chrome Canary to the AngularJS application that you want to debug. [Open the Developer Tools](https://developers.google.com/chrome-developer-tools/docs/overview#access). There should be an AngularJS icon. Click on it to open the AngularJS Batarang.


<!-- HELP TAB -->


The Batarang has four tabs: Model, Performance, Options, and Help. In order to begin using the Batarang you need to click the "enable" checkbox. This will cause the application's tab to refresh, and the Batarang to begin collecting perfomance and debug information about the inspected app.


### Model The Batarang has five tabs: Model, Performance, Dependencies, Options, and Help.
![Batarang screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/model-tree.png)
### Models
![Batarang screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/models.png)


Starting at the top of this tab, there is the root selection. If the application has only one `ng-app` declaration (as most applications do) then you will not see the option to change roots. Starting at the top of this tab, there is the root selection. If the application has only one `ng-app` declaration (as most applications do) then you will not see the option to change roots.


Below that is a tree showing how scopes are nested, and which models are attached to them. Clicking on a scope name will take you to the Elements tab, and show you the DOM element associated with that scope. Models and methods attached to each scope are listed with bullet points on the tree. Just the name of methods attached to a scope are shown. Models with a simple value and complex objects are shown as JSON. You can edit either, and the changes will be reflected in the application being debugged. Below that is a tree showing how scopes are nested, and which models are attached to them. Clicking on a scope name will take you to the Elements tab, and show you the DOM element associated with that scope. Models and methods attached to each scope are listed with bullet points on the tree. Just the name of methods attached to a scope are shown. Models with a simple value and complex objects are shown as JSON. You can edit either, and the changes will be reflected in the application being debugged.



### Performance ### Performance
![Batarang performance tab screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/performance.png) ![Batarang performance tab screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/perf.png)


The performance tab must be enabled separately because it causes code to be injected into AngularJS to track and report performance metrics. There is also an option to output performance metrics to the console. The performance tab must be enabled separately because it causes code to be injected into AngularJS to track and report performance metrics. There is also an option to output performance metrics to the console.


Below that is a tree of watched expressions, showing which expressions are attached to which scopes. Much like the model tree, you can collapse sections by clicking on "toggle" and you can inspect the element that a scope is attached to by clicking on the scope name. Below that is a tree of watched expressions, showing which expressions are attached to which scopes. Much like the model tree, you can collapse sections by clicking on "toggle" and you can inspect the element that a scope is attached to by clicking on the scope name.


Underneath that is a graph showing the relative performance of all of the application's expressions. This graph will update as you interact with the application. Underneath that is a graph showing the relative performance of all of the application's expressions. This graph will update as you interact with the application.


### Dependencies
![Batarang dependencies tab screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/deps.png)

The dependencies tab shows a visualization of the application's dependencies. When you hover over a service name, services that depend on the hovered service turn green, and those the hovered service depend on turn red.

### Options ### Options
![Batarang options tab screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/options.png) ![Batarang options tab screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/options.png)


Last, there is the options tab. The options tab has two checkboxes: one for "show scopes" and one for "show bindings." Each of these options, when enabled, highlights the respective feature of the application being debugged; scopes will have a red outline, and bindings will have a blue outline. Last, there is the options tab. The options tab has three checkboxes: one for "show applications," "show scopes," and "show bindings." Each of these options, when enabled, highlights the respective feature of the application being debugged; scopes will have a red outline, and bindings will have a blue outline, and applications a green outline.


### Elements ### Elements
![Batarang console screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/inspect.png) ![Batarang console screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/inspect.png)
Expand All @@ -51,4 +58,4 @@ The Batarang also hooks into some of the existing features of the Chrome develop
### Console ### Console
![Batarang console screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/console.png) ![Batarang console screenshot](https://github.com/angular/angularjs-batarang/raw/master/img/console.png)


The Batarang exposes some convenient features to the Chrome developer tools console. To access the scope of an element selected in the Elements tab of the developer tools, in console, you can type `$scope`. If you change value of some model on `$scope` and want to have this change reflected in the running application, you need to call `$scope.$apply()` after making the change. The Batarang exposes some convenient features to the Chrome developer tools console. To access the scope of an element selected in the Elements tab of the developer tools, in console, you can type `$scope`. If you change value of some model on `$scope` and want to have this change reflected in the running application, you need to call `$scope.$apply()` after making the change.
Binary file added img/deps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/model-tree.png
Binary file not shown.
Binary file added img/models.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/options.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/perf.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/performance.png
Binary file not shown.
22 changes: 13 additions & 9 deletions panes/help.html
@@ -1,32 +1,36 @@
<h2>Using the Batarang</h2> <p>In order to begin using the Batarang you need to click the "enable" checkbox. This will cause the application's tab to refresh, and the Batarang to begin collecting perfomance and debug information about the inspected app.</p>


<p>First, navigate Chrome Canary to the AngularJS application that you want to debug. <a target="_blank" href="https://developers.google.com/chrome-developer-tools/docs/overview#access">Open the Developer Tools</a>. There should be an AngularJS icon. Click on it to open he AngularJS Batarang.</p> <p>The Batarang has five tabs: Model, Performance, Dependencies, Options, and Help.</p>


<p>The Batarang has four tabs: Model, Performance, Options, and Help.</p> <h3>Models</h3>


<h3>Model</h3> <p><img src="/img/models.png" alt="Batarang screenshot" title="" /></p>

<p><img src="/img/model-tree.png" alt="Batarang screenshot" title="" /></p>


<p>Starting at the top of this tab, there is the root selection. If the application has only one <code>ng-app</code> declaration (as most applications do) then you will not see the option to change roots.</p> <p>Starting at the top of this tab, there is the root selection. If the application has only one <code>ng-app</code> declaration (as most applications do) then you will not see the option to change roots.</p>


<p>Below that is a tree showing how scopes are nested, and which models are attached to them. Clicking on a scope name will take you to the Elements tab, and show you the DOM element associated with that scope. Models and methods attached to each scope are listed with bullet points on the tree. Just the name of methods attached to a scope are shown. Models with a simple value and complex objects are shown as JSON. You can edit either, and the changes will be reflected in the application being debugged.</p> <p>Below that is a tree showing how scopes are nested, and which models are attached to them. Clicking on a scope name will take you to the Elements tab, and show you the DOM element associated with that scope. Models and methods attached to each scope are listed with bullet points on the tree. Just the name of methods attached to a scope are shown. Models with a simple value and complex objects are shown as JSON. You can edit either, and the changes will be reflected in the application being debugged.</p>


<h3>Performance</h3> <h3>Performance</h3>


<p><img src="/img/performance.png" alt="Batarang performance tab screenshot" title="" /></p> <p><img src="/img/perf.png" alt="Batarang performance tab screenshot" title="" /></p>


<p>The performance tab must be enabled separately because it causes code to be injected into AngularJS to track and report performance metrics. There is also an option to output performance metrics to the console.</p> <p>The performance tab must be enabled separately because it causes code to be injected into AngularJS to track and report performance metrics. There is also an option to output performance metrics to the console.</p>


<p>Below that is a tree of watched expressions, showing which expressions are attached to which scopes. Much like the model tree, you can collapse sections by clicking on "toggle" and you can inspect the element that a scope is attached to by clicking on the scope name.</p> <p>Below that is a tree of watched expressions, showing which expressions are attached to which scopes. Much like the model tree, you can collapse sections by clicking on "toggle" and you can inspect the element that a scope is attached to by clicking on the scope name.</p>


<p>Underneath that is a graph showing the relative performance of all of the application's expressions. This graph will update as you interact with the application.</p> <p>Underneath that is a graph showing the relative performance of all of the application's expressions. This graph will update as you interact with the application.</p>


<h3>Dependencies</h3>

<p><img src="/img/deps.png" alt="Batarang dependencies tab screenshot" title="" /></p>

<p>The dependencies tab shows a visualization of the application's dependencies. When you hover over a service name, services that depend on the hovered service turn green, and those the hovered service depend on turn red.</p>

<h3>Options</h3> <h3>Options</h3>


<p><img src="/img/options.png" alt="Batarang options tab screenshot" title="" /></p> <p><img src="/img/options.png" alt="Batarang options tab screenshot" title="" /></p>


<p>Last, there is the options tab. The options tab has two checkboxes: one for "show scopes" and one for "show bindings." Each of these options, when enabled, highlights the respective feature of the application being debugged; scopes will have a red outline, and bindings will have a blue outline.</p> <p>Last, there is the options tab. The options tab has three checkboxes: one for "show applications," "show scopes," and "show bindings." Each of these options, when enabled, highlights the respective feature of the application being debugged; scopes will have a red outline, and bindings will have a blue outline, and applications a green outline.</p>


<h3>Elements</h3> <h3>Elements</h3>


Expand All @@ -38,4 +42,4 @@ <h3>Console</h3>


<p><img src="/img/console.png" alt="Batarang console screenshot" title="" /></p> <p><img src="/img/console.png" alt="Batarang console screenshot" title="" /></p>


<p>The Batarang exposes some convenient features to the Chrome developer tools console. To access the scope of an element selected in the Elements tab of the developer tools, in console, you can type <code>$scope</code>. If you change value of some model on <code>$scope</code> and want to have this change reflected in the running application, you need to call <code>$scope.$apply()</code> after making the change.</p> <p>The Batarang exposes some convenient features to the Chrome developer tools console. To access the scope of an element selected in the Elements tab of the developer tools, in console, you can type <code>$scope</code>. If you change value of some model on <code>$scope</code> and want to have this change reflected in the running application, you need to call <code>$scope.$apply()</code> after making the change.</p>

0 comments on commit 9d8df86

Please sign in to comment.