You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-setup.md
+35-18
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ You can download the latest versions [here][node].
11
11
```bash
12
12
npm i -g yarn
13
13
```
14
+
14
15
**Why Yarn and not NPM?**
15
16
16
17
NPM installs the latest versions. We use [Yarn][yarn] because we want to make sure everyone is using the same libraries.
@@ -89,6 +90,7 @@ If you're looking for an alternative to opening Firefox from inside the debugger
89
90
**Firefox CLI**
90
91
91
92
1. Run `firefox-bin` from the command line.
93
+
92
94
```bash
93
95
/Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 -P development
94
96
```
@@ -97,12 +99,26 @@ You'll be prompted to create a new "development profile". The development profil
97
99
98
100
2. Navigate to `about:config` and accept any warning messages. Then, search for the following preferences, and double-click them to toggle their values according to [this example](http://g.recordit.co/3VsHIooZ9q.gif):
99
101
100
-
*`devtools.debugger.remote-enabled` to `true`
101
-
*`devtools.chrome.enabled` to `true`
102
-
*`devtools.debugger.prompt-connection` to `false`
102
+
-`devtools.debugger.remote-enabled` to `true`
103
+
-`devtools.chrome.enabled` to `true`
104
+
-`devtools.debugger.prompt-connection` to `false`
103
105
104
106
3. Restart Firefox by closing and reopening it with the `firefox-bin` command.
105
107
108
+
#### Using Web Sockets
109
+
110
+
If you are not seeing any tabs when you connect, it is possible that switching from a TCP server to a WS could help.
111
+
112
+
1. create a `local.json` file in `configs` and set `firefox.webSocketConnection` to `true`
113
+
2. Start Firefox from the command line
114
+
115
+
```
116
+
/Applications/Firefox\ Nightly.app/Contents/MacOS/firefox --start-debugger-server ws:8116 -P dev
117
+
```
118
+
119
+
> NOTE: if you are curious about how the debugger server starts listening on a port
120
+
> this function is useful: [devtools-startup.js](https://searchfox.org/mozilla-central/source/devtools/startup/devtools-startup.js#789-854)
121
+
106
122
### Starting Chrome
107
123
108
124
There are two ways to run Chrome for the purposes of remote debugging with the debugger:
@@ -123,36 +139,37 @@ And the slightly harder way:
123
139
124
140
It's easy to start Node in a mode where DevTools will find it:
125
141
126
-
**--inspect* - tells Node to open a debugger server.
127
-
**--inspect=9223* - tells Node to open a debugger server on 9223 instead of 9229.
128
-
**--debug-brk* - tells Node to pause on the first statement.
142
+
-_--inspect_ - tells Node to open a debugger server.
143
+
-_--inspect=9223_ - tells Node to open a debugger server on 9223 instead of 9229.
144
+
-_--debug-brk_ - tells Node to pause on the first statement.
**Note:***./node_modules/.bin/webpack* could be anything. We're often debugging Webpack these days, so it's often appropriate.
150
+
**Note:**_./node_modules/.bin/webpack_ could be anything. We're often debugging Webpack these days, so it's often appropriate.
135
151
136
152
**Note:** Currently, Node.js debugging is limited in some ways. For example, 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.
137
153
138
154
### Windows + Linux Setup
139
155
140
-
Windows and Linux should *just work* most of the time. However, there are several edge cases.
156
+
Windows and Linux should _just work_ most of the time. However, there are several edge cases.
141
157
142
158
If you find any issues on these two platforms, please leave a comment on these issues:
143
-
*[Windows][windows-issue]
144
-
*[Linux][linux-issue]
159
+
160
+
-[Windows][windows-issue]
161
+
-[Linux][linux-issue]
145
162
146
163
**Firefox Windows Command**
164
+
147
165
```
148
166
C:\Program Files (x86)\Mozilla Firefox\firefox.exe -start-debugger-server 6080 -P development
0 commit comments