Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Alias to invoke Chrome Canary w/ tracing, for IRHydra

An Alias to run Chrome with tracing enabled

For Chrome Canary:

alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'

For regular ol' Chrome:

alias hydra='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'

Usage:

  1. Run this with the desired URL:

hydra http://localhost:8080

  1. let it run for a few seconds, then close it
  2. go to http://mrale.ph/irhydra/2/
  3. click the folder icon
  4. select hydrogen-*.cfg and code-*.asm the above command spit out in your current working directory.
@lukeed

This comment has been minimized.

Copy link

lukeed commented Jan 27, 2017

There a way to run this for Node CLI apps, without an exposed port? Couldn't figure it out a while ago and didn't revisit since.

@CYBAI

This comment has been minimized.

Copy link

CYBAI commented Jun 2, 2017

I think the --user-data-dir=/tmp/profile flag should be out of --js-flags.

Like following,

alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --user-data-dir=/tmp/profile --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.