Permalink
Browse files

Added license; added instructions to readme; some ui and sample code …

…tweaks
  • Loading branch information...
1 parent e1cf43d commit 2b0d49daec51009a98aa4a7ce4201d8fb2353d69 lexandera committed Jul 27, 2011
Showing with 59 additions and 60 deletions.
  1. +19 −0 LICENSE
  2. +32 −4 README
  3. +4 −3 samples/calc.html
  4. +2 −51 ui/index.html
  5. +2 −2 ui/ui.js
View
@@ -0,0 +1,19 @@
+Copyright (C) 2011 by Aleksander Kmetec
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -1,15 +1,43 @@
-
Aardwolf is a remote JavaScript debugger for Android/iOS and is written in JavaScript.
+It's available under the MIT license.
+
+For some mindless drivel, see: http://lexandera.com/aardwolf/
+
+Currently supported features:
+- breakpoints
+- code evaluation at breakpoint
+- step/continue execution control
+- stack listing
+- JavaScript console remoting
+
It consists of the following parts:
+- a server for communication between the mobile device and the UI
- a code rewriter which injects debug info into your existing source code
- a debug library which can break execution of your scripts, report execution progress, evaluate code, etc.
- a UI for setting breakpoints, stepping through code and seeing the current position within the script
-- a server for communication between the debug library and the UI
-In order to run the server and the code rewriter you will need Node.js:
-- Get it here: http://nodejs.org/#download
+In order to run the examples you will need:
+- Node.js. Get it here: http://nodejs.org/#download
+- An Android 2.x or iOS device or emulator. (but a separate Firefox/Chrome/Safari window will also do...)
+
+
+Setting it up:
+- Download the source code.
+- Create the file config/config.local.js and paste into it the following lines:
+
+ var config = require('../config/config.defaults.js');
+ config.serverHost = 'ip-or-hostname-of-your-computer';
+- Make sure that access to the port 8500 on your computer is not blocked by a firewall and that the
+ address you entered into the config file in the previous step can really be accessed from your
+ phone. This is where your phone will load the samples from, so it must work.
+- Start the server by running "node app.js"
+- After the server starts up, open http://localhost:8000 in your desktop browser.
+ You should see a very ugly debugger appear UI.
+- Open http://ip-or-hostname-of-your-computer:8500/calc.html on your phone
+ (nothing will appear until the next step).
+- Press the "start" button in the debugger UI. You're now debugging the exmple script.
View
@@ -3,6 +3,7 @@
<head>
<title>Calculator</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
@@ -14,9 +15,9 @@
<body>
- Take <input id="number1" /> <br/>
- add <input id="number2" /> to it <br/>
- and multiply by <input id="number3" />.<br/>
+ Take <input type="number" id="number1" /> <br/>
+ add <input type="number" id="number2" /> to it <br/>
+ and multiply by <input type="number" id="number3" />.<br/>
<br/>
You get: <span id="result"></span>
<br/>
View
@@ -7,56 +7,7 @@
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="ui.js"></script>
- <style>
-
- .notatable {
- display:table;
- width: 100%;
- border-collapse:collapse;
- border-spacing:10px;
- }
-
- .notarow {
- display:table-row;
- }
-
- .notacell {
- display:table-cell;
- }
-
- #top-toolbar {
- margin-top: 10px;
- margin-bottom: 10px;
- }
-
- #code {
- background: #efefef;
- overflow-x: hide;
- overflow-y: scroll;
- height: 400px;
- clear: none;
- }
-
- textarea {
- width: 99%;
- font-family: "Courier New";
- font-size: 14px;
- }
-
- #output {
- background: #eee;
- font-family: "Courier New";
- font-size: 14px;
- }
-
- #output div {
- border-bottom: 1px solid #bbb;
- padding: 3px;
- }
-
-
- </style>
- <script></script>
+ <link href="ui.css" rel="stylesheet" type="text/css" />
</head>
<body>
@@ -86,7 +37,7 @@
<br/>
<br/>
- Stack:
+ Call stack:
<pre id="stack">
</pre>
View
@@ -1,7 +1,7 @@
$(function() {
- $('#breakpoints').val(JSON.stringify([['/sample1.js', 3], ['/sample1.js', 6]]));
- $('#eval').val("'foo'.toUpperCase()");
+ $('#breakpoints').val(JSON.stringify([['/calc.js', 21], ['/calc.js', 30]]));
+ $('#eval').val("");
$('#btn-start').click(initDebugger);
$('#btn-eval').click(evalCodeRemotely);

0 comments on commit 2b0d49d

Please sign in to comment.