Possible to write a marco to add debugging statements to an entire project?

Has anyone been tried to create a marcro (or any other techinque) to skip through all files in a project and add debugging statements after each function declaration?

I'm using 100% javascript, so source could look like:

Thingy.prototype.doStuff = function doStuff() {
    ...
}
function doMoreStuff() {
    ...
}

function doEvenMoreStuff()
{
    ...
}




Desired outcome:


Thingy.prototype.doStuff = function doStuff() {
    document.write('entering doStuff()');
    ...
}
function doMoreStuff() {
    document.write('entering doMoreStuff()');
    ...
}


function doEvenMoreStuff()
{
    document.write('entering doEvenMoreStuff()');
    ...
}





I haven't been able to figure out how to do this by simple recording. The closest thing I've ever seen is PDT's ability to disable trace statements globally.

Thanks!
Ben
1 comment
Comment actions Permalink

This is not currently possible, please create YouTrack ticket for that http://youtrack.jetbrains.net/dashboard#newissue=yes

0

Please sign in to leave a comment.