davidmarkclements / 0x

🔥 single-command flamegraph profiling 🔥
MIT License
3.21k stars 103 forks source link

When running the command it kills the child process. #275

Closed Raynos closed 1 year ago

Raynos commented 1 year ago
~/soundxyz/code/tools/admin-tools on jake/transfer-event-simpler*
$     TZ=UTC IS_ADMIN_TOOLS=1 0x --collect-only -- node --loader=bob-tsm src/index.ts
🔥  Profiling(node:1573822) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
? Choose an environment (Use arrow keys)
  development 
  preview 
❯ staging 
🔥  Stats collected in folder file:///home/raynos/soundxyz/code/tools/admin-tools/1573822.0x
raynos at system76-pc  

I expected it to profile the child process and generate an artifact that can be turned into a flamegraph

My child process is waiting on stdin response for me to choose an option but instead 0x killed it.

Can 0x pass the stdin through instead so I can select an option ?

STRd6 commented 1 year ago

Change the first item in the array to 'inherit' https://github.com/davidmarkclements/0x/blob/4abcd1e9cb7dcd473bf85f3074fd00a2b11d66f1/platform/v8.js#L36

Raynos commented 1 year ago

:+1: