Can anyone tell me what command to run Brave Browser clone in vscode

I just downloaded the clone. Can anyone tell me what command to run it in vscode. I tried to find an C++ or Java main method, tried npm run dev, npm run build and the scripts in the package.json but nothing works. I want to run it before making changes.

@dumbnoob

There is much to learn about cloning the Brave Browser repo AND ALSO including the Chrome/Chromium “stuff” - and your finding, and comparing the (Q and A) help of, at least 2 online AI services … is going to be better support.

Because you will have many questions and want much better response times, than what you can achieve here at the Brave Community.

In addition, there is a lot of detailed note-keeping BY YOU, every step of the way. A lot of your laboring that you will need to maintain in your notes.

IMHO

What exactly are you trying to communicate here? It is a simple question. From the few responses to questions that I have read on here I’m starting to think that a few people that have been on here for a while don’t think that anyone else should be here. I thought that this was where you could come and ask questions and get support, no matter how stupid they are without being belittled or disrespected. Starting to look a lot like the toxic cesspool that used to be Stack Overflow.

@dumbnoob

From what little you wrote (you might edit your Original Post and include your Operating System)

“I just downloaded the clone.”

sounds like your current status is, you are missing the enormous Chromium stuff. And, I tried to point you toward where you will get answers much more quickly than here at the Brave Community.

Somewhere in the following response by ChatGPT, you may find what you need, in order to continue; much depends upon your requests (re info you provide) made at an AI … ChatGPT:

What you have right now is only the Brave layer (brave-core)

To actually pull down everything needed to build/test, Brave relies on depot_tools and its meta-sync system (gclient), not plain Git.

Here’s how it works conceptually:

:brain: Big picture

  • brave-core = Brave-specific code + patches
  • Chromium = upstream browser (~tens of GB)
  • gclient sync = fetches Chromium + all dependencies defined in Brave’s DEPS files

:puzzle_piece: What you’d need to do (when you do decide to proceed)

1. Install depot_tools

This is mandatory because gclient lives here.

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=“$PATH:/path/to/depot_tools”

(You’d usually add that to your shell profile.)


2. Initialize the Brave + Chromium workspace

From your brave directory:

gclient sync --with_branch_heads --with_tags

This is the key step:

  • Reads Brave’s .gclient / DEPS
  • Downloads Chromium source
  • Pulls in all required third-party dependencies
  • Sets up the correct directory structure

3. Expect a very large checkout

This is not a small addition:

  • ~20–30+ GB download (often more)
  • Many thousands of repos/dependencies
  • Long runtime (can be hours depending on disk/network)

An external, worthy SSD or HDD is actually a good idea for this.


4. After syncing (for context only)

You’d typically then:

npm install
npm run init

And eventually build via Brave’s scripts, which wrap Chromium’s gn + ninja build system.


:warning: Important distinctions

  • git submodule update --recursive → only handles Git submodules inside Brave
  • gclient sync → pulls non-Git-managed dependencies + Chromium itself

They are not interchangeable.


:compass: Why Brave does it this way

Because Chromium:

  • uses a custom dependency system (DEPS)
  • spans hundreds of repos
  • requires pinned revisions across everything

gclient ensures everything lines up exactly with Brave’s expected version.


:test_tube: If your goal is just “code exploration”

Pulling Chromium is only necessary if you want:

  • full builds
  • deep debugging into engine internals
  • modifying rendering/network stack

:+1: Practical advice

If you eventually try it:

  • Make sure you have at least ~100 GB free
  • Use a fast drive
  • Be patient with gclient sync—it can look “stuck” but isn’t

IF BUILDING BRAVE BROWSER, SEE:

Brave Browser Build Deconstructed ‐ overview of the underlying tools:

https://github.com/brave/brave-browser/wiki/Brave-Browser-Build-Deconstructed-‐-overview-of-the-underlying-tools


Brave Browser GitHub repo notes that contain build tools and links to build-related documentation, including public and internal build configuration references:
https://github.com/brave/brave-browser

Public wiki includes a Build configuration page with build flags and setup details for brave-core:
https://github.com/brave/brave-browser/wiki/
https://github.com/brave/brave-browser/wiki/Build-configuration

Brave Developer tips page with development-oriented steps such as presubmit checks and coding style guidance:
https://github.com/brave/brave-browser/wiki/Brave-Developer-tips

Brave Windows Development Environment guide:
https://github.com/brave/brave-browser/wiki/Windows-Development-Environment


Problems …

April 2021 > Issue #15487 “Building from scratch”:
https://github.com/brave/brave-browser/issues/15487

December 2024 > Issue #42909 “npm run build - Debug succeeds but npm start Debug fails on Ubuntu 22.04.4 LTS”:
https://github.com/brave/brave-browser/issues/42909


ChatGPT: How you actually run your custom Brave build (macOS)

Option 1 - Open the app bundle (most common), launches your locally built browser:

open src/out/Default/Brave\ Browser.app

Option 2 - Run the binary directly (for debugging):

./src/out/Default/Brave\ Browser

This is useful when:

  • you want logs in terminal
  • debugging crashes
  • testing flags

Option 3 - Run with debug flags - very common in development:

./src/out/Default/Brave\ Browser --enable-logging --v=1


You don’t run VSCode extension commands in the terminal.

Most extensions expose commands through the Command Palette (Ctrl + Shift + P), not as CLI commands.

Try opening the Command Palette and searching for the extension name or its command instead of running it in the terminal.