Setting up Chrome V8 for Debugging in Windows Platform and Linux Platform

 This is my first blog post. Many people struggle with setting up Chrome V8 for learning purposes, which is why I am writing this for anyone who wants to conduct research on Chrome V8. In this post, I will detail how to setting up Chrome V8 on Windows and Linux.


Chrome logo from PC World


To setting up the Chrome V8 debugging environment, you can do it on a Virtual Machine or a Physical Machine. For better performance, you should set it up on a Physical Machine.


Setup Chrome V8 on Windows Platform

Requirement for setup:

During the installation of Microsoft Visual Studio, please select the following features:

From the Visual Studio Installer, select these two Workloads:
• Desktop Development with C++
• Python Development
From the Individual Components window pane, select the following items:
• C++ ATL for Latest v143 Build Tools (x86 & x64)
• C++ MFC for Latest v143 Build Tools (x86 & x64)
• C++ Clang Compiler for Windows (17.0.3)
• MSBuild support for LLVM (clang-cl) toolset
• C++ CMake tools for Windows
• Git for Windows
        • Windows 11 SDK (10.0.22621.0)





Next step you must install Windows SDK Debugging Tools

During you install Windows SDK Debugging Tools, make sure you store it in C:\Program Files (x86)\Windows Kits\10\Debuggers.


You have installed all the Windows development prerequisites, It is time to install the Development V8 Tools.

You can command in cmd as below

C:\v8_dev> git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
remote: Sending approximately 49.80 MiB ...
remote: Counting objects: 9, done
remote: Finding sources: 100% (9/9)
remote: Total 59597 (delta 42743), reused 59594 (delta 42743)
Receiving objects: 100% (59597/59597), 49.78 MiB | 11.15 MiB/s, done.
Resolving deltas: 100% (42743/42743), done.


You can add the depot tools folder at the beginning of the PATH system variable as well as the two user variables DEPOT_TOOLS_WIN_TOOLCHAIN and vs2022_install. We set them to 0 and the VS2022 installation location C:\Program Files\Microsoft Visual Studio\2022\Community.

Please follow the command below

setx PATH "C:\v8_dev\depot_tools\;%PATH%" /M
setx vs2022_install "C:\Program Files\Microsoft Visual Studio\2022\Community"
setx DEPOT_TOOLS_WIN_TOOLCHAIN "0"

Start write the next paragraph here

Next step is updating Depot Tools, it will take sometimes to complete the update


C:\v8_dev\depot_tools> gclient
Updating depot_tools...
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.com/client?platform=windows-amd64&version=git_revision:200dbdf0e967e81388359d3f85f095d39b35db67...
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Usage: gclient.py  [options]

Meta checkout dependency manager for Git.

Commands are:
  config       creates a .gclient file in the current directory
...

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -j JOBS, --jobs=JOBS  Specify how many SCM commands can run in parallel;
                        defaults to 20 on this machine
  -v, --verbose         Produces additional output for diagnostics. Can be
                        used up to three times for more logging info.
  --gclientfile=CONFIG_FILENAME
                        Specify an alternate .gclient file
  --spec=SPEC           create a gclient file containing the provided string.
                        Due to Cygwin/Python brokenness, it can't contain any
                        newlines.
  --no-nag-max          Ignored for backwards compatibility.

Start write the next paragraph here

Comments

Popular posts from this blog

Hacker Who Hacked Hacking Team

Hacking into Gamma is like eating popcorn