File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 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
2222npx ava debug --break test.js
2323```
2424
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 :
2626
2727``` console
28- npx ava debug --port 9230 test.js
28+ npx ava debug --host 0.0.0.0 -- port 9230 test.js
2929```
3030
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
131131 description : 'Break before the test file is loaded' ,
132132 type : 'boolean'
133133 } ,
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+ } ,
134139 port : {
135140 default : 9229 ,
136141 description : 'Port on which you can connect to the inspector' ,
@@ -145,6 +150,7 @@ exports.run = async () => { // eslint-disable-line complexity
145150 debug = {
146151 break : argv . break === true ,
147152 files : argv . pattern ,
153+ host : argv . host ,
148154 port : argv . port
149155 } ;
150156 } )
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ ipc.options.then(async options => {
189189 dependencyTracking . install ( testPath ) ;
190190
191191 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 ) ;
193193 if ( options . debug . break ) {
194194 debugger ; // eslint-disable-line no-debugger
195195 }
You can’t perform that action at this time.
0 commit comments