node.js - node js - debugging the event loop -
in express.js project works fine, having several routing files other function files, feel bit drowning in functions, not knowing functions run, when, , caller.
for example, have 2 functions may run many times in event loop: router.use see constructor related routes (from want filter out some), , verify token function should run when conditions met, such api calls, or regular calls detect admin cookie etc.
i'm trying generate log can me find functions called more once , caller. sort of map per event.
i use console.log see order , current call url when firing event, , use node-inspector's breakpoints see how many times functions router.use called, when manually following functions in node-inspector, many node core files involved in process, makes task more tedious because interested debug functions... , doesn't let me see bigger picture, more readable information on zoomed out perspective.
what preferable method generate such log/report?
Comments
Post a Comment