Key commands for building, debugging, and testing in V8.
Use this skill to find the correct commands for common development tasks in V8. This unifies the commands listed in workspace configuration and ensures consistent usage. Refer to env_abstraction for platform-specific overrides.
V8 uses gm.py as a wrapper around GN and Ninja for building.
tools/dev/gm.py quiet x64.debug teststools/dev/gm.py quiet x64.optdebug teststools/dev/gm.py quiet x64.release testsNote: Always pass the quiet keyword unless told otherwise to avoid excessive output.
Run d8 with GDB or LLDB for native code debugging.
# Example of running d8 with gdb
gdb --args out/x64.debug/d8 --my-flag my-script.js
--trace-opt: Log optimized functions.--trace-deopt: Log when and why functions are deoptimized.--trace-gc: Log garbage collection events.--allow-natives-syntax: Enables calling of internal V8 functions (e.g., %OptimizeFunctionOnNextCall(f)) from JavaScript for testing purposes.A comprehensive list of all flags can be found by running out/x64.debug/d8 --help.
For detailed instructions on running tests and interpreting failures, see the dedicated v8_testing skill.
Key commands summary:
tools/run-tests.py --progress dots --outdir=out/x64.optdebug