Skip to content

Commit 23440cc

Browse files
committed
Merge branch 'patch-1' of https://github.com/dandv/tracegl
2 parents 15e07d4 + 178c398 commit 23440cc

1 file changed

Lines changed: 23 additions & 21 deletions

File tree

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
TraceGL
2-
=======
1+
# TraceGL
32

4-
TraceGL MPL release (C) Mozilla Corp
53

6-
Running traceGL unpackaged:
4+
traceGL is a [JavaScript codeflow visualization and debugging tool built using WebGL](http://badassjs.com/post/48702496345/tracegl-a-javascript-codeflow-visualization-and). It was originally a commercial offering developed by Rik Arends, who has later [open sourced](https://github.com/codegl/tracegl/issues/120) it under the [Mozilla Public License](https://www.mozilla.org/MPL/) (MPL).
5+
6+
traceGL transforms your JavaScript, injecting monitoring code that produces a log of everything that happens. This log is streamed from the target (node or browser), via the traceGL node.js process to the UI for visualisation. The UI tries to display the resulting huge amount of information fast, and uses webGL to render everything.
7+
8+
## Running traceGL
9+
10+
Upackaged:
711
```
812
git clone git@github.com:/traceglMPL/tracegl.git
913
cd tracegl
@@ -14,35 +18,32 @@ Packaging tracegl into a single JS file you can copy everywhere (like your home
1418
node tools/packer.js trace/trace_server tracegl.js
1519
cp tracegl.js ~/
1620
````
17-
How it works
18-
==
19-
traceGL transforms your JavaScript, injecting monitoring code that produces a log of everything that happens. This log is streamed from the target (node or browser), via the traceGL node.js process to the UI for visualisation. The UI tries to display the resulting huge amount of information fast, and uses webGL to render everything.
2021
21-
Node.js programs
22-
--
22+
## Node.js programs
23+
2324
````
2425
node ~/tracegl [options] yourprogram.js [arguments]
2526
````
2627
The visualisation UI is available on http://localhost:2000.
2728
28-
Browser JS via static fileserver
29-
--
29+
## Browser JS via static fileserver
30+
3031
The built in static fileserver allows traceGL to instrument all the JavaScript files it serves to the browser and gather information. It auto-reloads the site when a file changes so you can live-code with it.
3132
3233
node tracegl [options] ../path/to/wwwroot
3334
34-
Browser JS via proxy
35-
--
35+
## Browser JS via proxy
36+
3637
Sometimes your JavaScript is delivered by your Rails or Java backend to the browser. In this case you need a man-in-the-middle approach via traceGL's proxy mode. For a Ruby backend on port 3000:
3738
3839
node tracegl [options] http://localhost:3000
3940
40-
Editor integration
41-
--
41+
## Editor integration
42+
4243
By doubleclicking on a line in the visualisation UI you can open it in your favorite editor. See the settings for information how to configure this
4344
44-
Commandline options
45-
--
45+
## Command line options
46+
4647
```
4748
node ~/tracegl [options] target [args]
4849
```
@@ -71,8 +72,8 @@ Filtering can be useful to lower the amount of incoming tracedata. Use -do and -
7172
7273
-update Update tracegl.js to the latest version, uses your token to fetch update
7374
74-
Settings file
75-
--
75+
## Settings file
76+
7677
For other settings and commandline defaults traceGL supports a tracegl.json file which it tries to read from the current directory, your home dir, or the directory you store the tracegl.js file (in that order).
7778
7879
Create a template tracegl.json using the -settings command, and then modify these fields:
@@ -97,6 +98,7 @@ Editor integration uses a commandline call to your editor, and uses $file and $l
9798
"bin":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
9899
"args":["$file:$line"]
99100
```
100-
Issues
101-
--
101+
102+
## Issues
103+
102104
traceGL cannot instrument JavaScript coming from outside of its reach. For instance if you load jQuery from the google CDN, it cannot visualise that codeflow because it is not delivered by the traceGL proxy or static fileserver. If you keep your JS served through traceGL it should be no problem.

0 commit comments

Comments
 (0)