File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ Run with the `--break` option to ensure the DevTools hit a breakpoint right befo
22
22
npx ava debug --break test.js
23
23
```
24
24
25
- You can also customize the port. It defaults to ` 9229 ` :
25
+ By default the inspector listens on ` 127.0.0.1:9229 ` . You can customize the host and the port :
26
26
27
27
``` console
28
- npx ava debug --port 9230 test.js
28
+ npx ava debug --host 0.0.0.0 -- port 9230 test.js
29
29
```
30
30
31
- You'll have to add a connection for this port in the * Connection* tab. AVA only binds to ` localhost ` .
31
+ You'll have to add a connection for this port in the * Connection* tab.
Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ exports.run = async () => { // eslint-disable-line complexity
131
131
description : 'Break before the test file is loaded' ,
132
132
type : 'boolean'
133
133
} ,
134
+ host : {
135
+ default : '127.0.0.1' ,
136
+ description : 'Address or hostname through which you can connect to the inspector' ,
137
+ type : 'string'
138
+ } ,
134
139
port : {
135
140
default : 9229 ,
136
141
description : 'Port on which you can connect to the inspector' ,
@@ -145,6 +150,7 @@ exports.run = async () => { // eslint-disable-line complexity
145
150
debug = {
146
151
break : argv . break === true ,
147
152
files : argv . pattern ,
153
+ host : argv . host ,
148
154
port : argv . port
149
155
} ;
150
156
} )
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ ipc.options.then(async options => {
189
189
dependencyTracking . install ( testPath ) ;
190
190
191
191
if ( options . debug ) {
192
- require ( 'inspector' ) . open ( options . debug . port , '127.0.0.1' , true ) ;
192
+ require ( 'inspector' ) . open ( options . debug . port , options . debug . host , true ) ;
193
193
if ( options . debug . break ) {
194
194
debugger ; // eslint-disable-line no-debugger
195
195
}
You can’t perform that action at this time.
0 commit comments