Get all executed code by feature/function call in one place
Hi
Can anyone help me with this:
I like to get all code by feature.
When some function is called to get all line of code that is called, until some stop, for example calling api.
Like each step from debugger but that to be shown/save in one file.
I need something opposite from console.trace(), top down approach and i need each line of code not just function names and file location.
I need this for Javascript
Example:
function f1() {
var p1= 'p1';
var x = 10;
var y = 10;
var z = x + y;
console.log('print z: ' + z);
f3();
}
function f2() {
var p2= 'p2';
p2= 'new value';
}
function f3() {
var p3= 'p3';
p3= 'new value';
f5();
}
function f4() {
var p4= 'p4';
p4= 'new value';
}
function f5() {
var p5= 'p5';
p5= 'new value';
}
f1(); // or ExampleTracer(f1, arg1, arg2)
/* result with:
f1();
var p1= 'p1';
var x = 10;
var y = 10;
var z = x + y;
console.log('print z' + z);
f3();
var p3= 'p3';
p3= 'new value';
f5();
var p5= 'p5';
p5= 'new value';
show in one screen, save in variable or file.
*/
Please sign in to leave a comment.
No, nothing of this kind is available in WebStorm; you can probably post a question at stackoverflow.com - there might be some modules/libraries for this
Ok, thanks for the suggestion, i`ll ask there also.
Any other suggestion how to create plugin for WebStorm to achieve this?
I guess many of functionalities can be used from WebStorm, because it knows how to navigate between functions.
BTW, you can look at spy-js (https://github.com/spy-js/spy-js) - it doesn't do exactly what you want, but provides some advanced tracing capabilities