<commit_before>## Getting Setup

![][debugger-intro-gif]

:construction_worker: If something goes wrong, checkout our [most common issues][common-issues] and find us in [slack]!

### Step 1. Installing the Debugger

First, we'll clone the debugger locally, then we'll install its
dependencies with [Yarn]. If you don't have Yarn, you can install it [here][yarn-install].

Also, before you start, it's helpful to make sure you have node 7.
We recommend, [nvm] for updating the latest node.

```bash
git clone https://github.com/devtools-html/debugger.html.git
cd debugger.html
yarn install
```



*Why Yarn and not NPM?*

We like [Yarn] because it makes sure everyone is using the same library versions.

### Step 2. Start the Debugger

Next, we'll start the debugger and run it [locally][dev-server].

```bash
yarn start
```

Open `http://localhost:8000` in any browser and launch
Firefox or Chrome. You should now be able to select a
tab to debug.

| Launchpad | Tabs |
| -- | -- |
| ![pad2-screenshot] | ![launchpad-screenshot] |

Congratulations! You're now up and running. :sweat_smile:

*What should I do if I get an error?*

Ask in our [slack] channel or file an issue [issue][yarn-run-firefox-fails] here.

Here is a list of some of the [most common issues][common-issues]

### Next Steps

Try this [first activity][first-activity] if you want to start debugging the debugger! :clap:

## Appendix

### Quick Setup

This setup is for people on the DevTools team and DevTools wizards.

```bash
curl -o- -L https://yarnpkg.com/install.sh | bash -s
git clone <EMAIL>:devtools-html/debugger.html.git
cd debugger.html
yarn install

# close firefox if it's already running
/Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 -P development

# create a new terminal tab
cd debugger.html
yarn start
```

### Starting Firefox

If you're looking for an alternative to `yarn run firefox`, you have several
alternatives.

#### Firefox CLI

##### 1. Run `firefox-bin` from the command line
```bash
/Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 -P development
```

You'll be shown a prompt to create a new "development" profile. The development profile is where your remote development user settings will be kept. *It's a good thing :)*

##### 2. Go to `about:config` and set these preferences

Navigate to `about:config` and accept any warning message. Then search for the following preferences and double click them to toggle their values to the following. [example](http://g.recordit.co/3VsHIooZ9q.gif)

* `devtools.debugger.remote-enabled` to `true`
* `devtools.chrome.enabled` to `true`
* `devtools.debugger.prompt-connection` to `false`

##### 3. Restart Firefox

Close firefox and re-open it with the `firefox-bin` command.

#### Firefox GCLI

1. Open Firefox
2. Press <kbd>shift</kbd>+<kbd>F2</kbd> to open GCLI
3. Type `listen 6080` into GCLI

NOTE: This assumes that you've already set the other preferences in
`about:config`.

#### Firefox using WebSocket transport

The default, traditional way to connect to Firefox uses a custom TCP protocol.
However, Firefox also now supports connecting via WebSockets as well.  To use
this mode:

##### 1. Create a `configs/local.json` file in your `debugger.html` clone with:
```
{
  "firefox": {
    "webSocketConnection": true,
    "webSocketHost": "localhost:6080"
  }
}
```
##### 2. Enable WebSocket mode when opening the server socket
  * With the Firefox CLI approach, add the `ws:` prefix to the port:
  ```bash
  /Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server ws:6080 -P development
  ```
  * With the GCLI approach, enter `listen 6080 websocket`


### Starting Chrome

There are two ways to run chrome. Here's the easy way to run chrome

```bash
yarn run chrome
```

Here's the slightly harder way.

```bash
 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --user-data-dir=/tmp/chrome-dev-profile
```

Note that the [script](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/bin/chrome-driver.js) just automates the command :)

### Starting Node

It's easy to start Node in a mode where DevTools will find it:

* `--inspect` - tells node to open a debugger server
* `--debug-brk` - tells node to pause on the first statement

```bash
node --inspect --debug-brk ./node_modules/.bin/webpack
```

**Note** *./node_modules/.bin/webpack* could be anything. We're often debugging webpack these days so it's often appropriate :unamused:

**Note:** Currently Node.js debugging is limited in some ways, there isn't support for seeing variables or the console, but you can manage breakpoints and navigate code execution (pause, step-in, step-over, etc.) in the debugger across various sources.

### Windows + Linux setup<commit_msg>[Update Doc] - Remove --debug-brk (#5297)<commit_after>## Getting Setup

![][debugger-intro-gif]

:construction_worker: If something goes wrong, checkout our [most common issues][common-issues] and find us in [slack]!

### Step 1. Installing the Debugger

First, we'll clone the debugger locally, then we'll install its
dependencies with [Yarn]. If you don't have Yarn, you can install it [here][yarn-install].

Also, before you start, it's helpful to make sure you have node 7.
We recommend, [nvm] for updating the latest node.

```bash
git clone https://github.com/devtools-html/debugger.html.git
cd debugger.html
yarn install
```



*Why Yarn and not NPM?*

We like [Yarn] because it makes sure everyone is using the same library versions.

### Step 2. Start the Debugger

Next, we'll start the debugger and run it [locally][dev-server].

```bash
yarn start
```

Open `http://localhost:8000` in any browser and launch
Firefox or Chrome. You should now be able to select a
tab to debug.

| Launchpad | Tabs |
| -- | -- |
| ![pad2-screenshot] | ![launchpad-screenshot] |

Congratulations! You're now up and running. :sweat_smile:

*What should I do if I get an error?*

Ask in our [slack] channel or file an issue [issue][yarn-run-firefox-fails] here.

Here is a list of some of the [most common issues][common-issues]

### Next Steps

Try this [first activity][first-activity] if you want to start debugging the debugger! :clap:

## Appendix

### Quick Setup

This setup is for people on the DevTools team and DevTools wizards.

```bash
curl -o- -L https://yarnpkg.com/install.sh | bash -s
git clone git@github.com:devtools-html/debugger.html.git
cd debugger.html
yarn install

# close firefox if it's already running
/Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 -P development

# create a new terminal tab
cd debugger.html
yarn start
```

### Starting Firefox

If you're looking for an alternative to `yarn run firefox`, you have several
alternatives.

#### Firefox CLI

##### 1. Run `firefox-bin` from the command line
```bash
/Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 -P development
```

You'll be shown a prompt to create a new "development" profile. The development profile is where your remote development user settings will be kept. *It's a good thing :)*

##### 2. Go to `about:config` and set these preferences

Navigate to `about:config` and accept any warning message. Then search for the following preferences and double click them to toggle their values to the following. [example](http://g.recordit.co/3VsHIooZ9q.gif)

* `devtools.debugger.remote-enabled` to `true`
* `devtools.chrome.enabled` to `true`
* `devtools.debugger.prompt-connection` to `false`

##### 3. Restart Firefox

Close firefox and re-open it with the `firefox-bin` command.

#### Firefox GCLI

1. Open Firefox
2. Press <kbd>shift</kbd>+<kbd>F2</kbd> to open GCLI
3. Type `listen 6080` into GCLI

NOTE: This assumes that you've already set the other preferences in
`about:config`.

#### Firefox using WebSocket transport

The default, traditional way to connect to Firefox uses a custom TCP protocol.
However, Firefox also now supports connecting via WebSockets as well.  To use
this mode:

##### 1. Create a `configs/local.json` file in your `debugger.html` clone with:
```
{
  "firefox": {
    "webSocketConnection": true,
    "webSocketHost": "localhost:6080"
  }
}
```
##### 2. Enable WebSocket mode when opening the server socket
  * With the Firefox CLI approach, add the `ws:` prefix to the port:
  ```bash
  /Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server ws:6080 -P development
  ```
  * With the GCLI approach, enter `listen 6080 websocket`


### Starting Chrome

There are two ways to run chrome. Here's the easy way to run chrome

```bash
yarn run chrome
```

Here's the slightly harder way.

```bash
 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --user-data-dir=/tmp/chrome-dev-profile
```

Note that the [script](https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-launchpad/bin/chrome-driver.js) just automates the command :)

### Starting Node

It's easy to start Node in a mode where DevTools will find it:

* `--inspect-brk` - tells node to open a debugger server and pause on the first statement

```bash
node --inspect-brk ./node_modules/.bin/webpack
```

**Note** *./node_modules/.bin/webpack* could be anything. We're often debugging webpack these days so it's often appropriate :unamused:

**Note:** Currently Node.js debugging is limited in some ways, there isn't support for seeing variables or the console, but you can manage breakpoints and navigate code execution (pause, step-in, step-over, etc.) in the debugger across various sources.

### Windows + Linux setup
{'fraction_non_alphanumeric': 0.11412429378531073, 'fraction_numerical': 0.010066769388803288, 'mean_word_length': 4.217577706323687, 'pattern_counts': {'":': 6, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6161487', 'n_tokens_mistral': 3173, 'n_tokens_neox': 2911, 'n_words': 1191}