babel-plugin-trace

automatic console logger.

plugin would to instrument such cases

function call

// file: index.js
// from
alert('hello world!')

// to
(function (firstArgument) {
    console.log('>>> CALL index.js alert("Hello world!")');
    return alert(firstArgument);
})('hello world!');

variable assignment

// from
window.name = "FOO";

// to:
window.name = (function (firstArgument) {
    console.log('>>> ASSIGN index.js window.name from "" to "FOO"');
    return "FOO";
})();

See fixtures dir for more examples: fixtures

state

very WIP

source code is very small, please browse it