Repository navigation
Home
Purple will need three main components to get off the ground:
- Interactive Log,
- JavaScript Instrumentation,
- Runtime Control.
The Log is a long array of events. Some events arrive from the Chrome browser, both devtools events and chrome.extension events. (todo) Some events arrive from the JavaScript instrumentation system. (todo) Some events arrive from other processes or machines (see Causeway).
The Log output shows up in an interactive console-like UI. The interaction includes:
- browsing for more detailed information (opening twistys),
- (todo) searching for related information (findAnything bar),
- editing source related to log entries,
- (todo) opening external editors on log entries,
- (todo) triggering instrumentation and re-execution to create new Log entries.
(todo) The JS instrumentation includes:
- Manipulate the runtime using the Chrome devtools API,
- Re-compile the JavaScript using Traceur's code generator to add statements that extract information
- Shim the DOM API to log/control/modify the interaction of the app with the browser.
(todo) The runtime control includes:
- Automated reload/re-submit events,
- Re-execution of event loops,
- Simulation of re-load/re-execution (proxied I/O)
- Checkpoint browser state.
Start with the Log and its UI: these can be built and useful without instrumentation or runtime control. So goal #1 is a useful tool for rapid, small edits based on browser events and console logs. This may not win any users, but this stage should support some dogfood use to drive quality and function on the Log. (The current system is a prototype for this goal #1).
Dev tools already supports function replacement. We need to leverage this and learn its limitations.
Add instrumentation of JS exceptions.
Many exceptions can be solved with one line edits;
others can be solved with more data than current stack traces give.
The instrumentation may be all through dev tools APIs.
This will exercise the Cool Console and Hot-load JS in a realistic way.
Run a complete web site's JS through the Traceur compiler. This intermediate step does not help Purple, but it would provide a way to test Traceur on arbitrary sites.
A reproduction point is a (single) breakpoint after bug symptom. This begins runtime control. Probably some user value.
From the reproduction point, re-run just the event loop.
Here the Traceur step causes new log events.