adobe-research / node-theseus

76 stars 13 forks source link

Feature Request: node_modules tracing #23

Closed bugs181 closed 10 years ago

bugs181 commented 10 years ago

As far as I can tell, node-theseus does not work with require()'ed node modules. We have a lot of custom node modules where this utility would be absolutely welcome.

Additionally, console.log's from inside node modules are never shown in Theseus.

For example:

module.exports = {
    init: function() {
        // This method has no calls added by node-theseus.
    }
};
alltom commented 10 years ago

Theseus doesn't instrument any file with node_modules in its path by default because fondue doesn't scale very well and most of the time you don't care what happens in those files. :)

But you can turn that feature off by passing --theseus-include-modules to node-theseus. You might also want to use --theseus-exclude=glob to exclude modules you don't care about if things get slow.

Hmm, --theseus-include=glob seems like a good idea... It would probably be easy to add if you were so inclined. :)

Let me know if this isn't the info you needed!

bugs181 commented 10 years ago

This is exactly the info I needed. Are you suggesting we enable --theseus-include-modules by default and exclude glob files for obvious performance improvements? Or to exclude glob files by default any time --theseus-include-modules is used? Thanks a bunch for all of the help and quick responses!

alltom commented 10 years ago

For everyone, no, but maybe for you I think it makes sense to use it by default.

bugs181 commented 10 years ago

Aha! Okay, yeah that makes sense. Closing this as it answers the feature request. Thanks!