Use dtruss to profile node.js server on MacOS

245 Views Asked by At

Just experimenting with dtruss/dtrace here. I have this command:

sudo dtruss node server.js &> my-dtruss.log

that log looks like this: https://gist.github.com/ORESoftware/9b4d47682a8f0ec25330c02b4ef3ea2d

my question is, if my NODE_ENV var is set, why is it unset for child processes of dtruss command? and how can I set env variables for the node process?

my node server crashes if NODE_ENV is not set, so that's why I assume the dtruss output ends and does not continue.

0

There are 0 best solutions below