How to debug code in a package?


Hi guys,

How can I debug code that is in a package?

The case is I’m not the author of the package, but I want to put either a console.log(blah) or debugger in the code of that package to see what’s going on.

I didn’t find where meteor places the code of the added packages in the app. I’ve failed to find it with the text editor. Where is their code?


The most straightforward option is to use web inspector (or node inspector on the server) and set breakpoints through the web UI.

However, you can find the package code buried deep in the .meteor folder structure:

server: .meteor/local/build/programs/server/packages
browser: .meteor/local/build/programs/web.browser/packages

I’ve not tested editing these, so not sure what will happen - perhaps you can let us know! :smile:


That was what I was looking for! thank you @robfallows!