Install v8-debug

Install v8-debug

4月 11, 2021 · 1 分钟阅读时长 · 71 字 · -阅读 -评论

To understand JavaScript deeply you eventually dive into V8. The v8-debug shell helps inspect bytecode, optimizations, etc. Here’s how I install it.

Installation

Some suggest brew install v8, but that build lacked --print-ast for me, so I don’t recommend it.

  1. npm install -g jsvu
  2. Run jsvu and select V8 debug. Re-running jsvu updates the installed V8 versions.
  3. Add to .bashrc/.zshrc:
    export PATH="$HOME/.jsvu:$PATH"
    alias d8='v8-debug'
    
    The alias makes launching the shell easier.
Alan H
Authors
开发者,数码产品爱好者,喜欢折腾,喜欢分享,喜欢开源