@@ -256,6 +256,7 @@ if (!process.env.FORCE_COLOR && process.stdout.hasColors?.() && process.stderr.h
256
256
}
257
257
258
258
const engineName = `${ options . engine } engine` // used for warnings to user
259
+ const engineFlagError = ( flag ) => `${ engineName } does not support --${ flag } `
259
260
const engineOptions = ENGINES . get ( options . engine )
260
261
assert ( engineOptions , `Unknown engine: ${ options . engine } ` )
261
262
Object . assign ( options , engineOptions )
@@ -269,8 +270,8 @@ setEnv('EXODUS_TEST_IS_BROWSER', isBrowserLike ? '1' : '')
269
270
setEnv ( 'EXODUS_TEST_IS_BAREBONE' , options . barebone ? '1' : '' )
270
271
setEnv ( 'EXODUS_TEST_ENVIRONMENT' , options . bundle ? 'bundle' : '' ) // perhaps switch to _IS_BUNDLED?
271
272
272
- assert ( ! options . devtools || isBrowserLike , '-- devtools can be only used with browser engines' )
273
- assert ( ! options . throttle || options . browsers , ` ${ engineName } does not support -- throttle-cpu` )
273
+ assert ( ! options . devtools || isBrowserLike || ! options . pure , engineFlagError ( ' devtools' ) )
274
+ assert ( ! options . throttle || options . browsers , engineFlagError ( ' throttle-cpu' ) )
274
275
275
276
const require = createRequire ( import . meta. url )
276
277
const resolveRequire = ( query ) => require . resolve ( query )
@@ -690,6 +691,11 @@ if (options.pure) {
690
691
assert ( files . length > 0 ) // otherwise we can run recursively
691
692
assert ( ! options . binaryArgs )
692
693
if ( options . concurrency ) args . push ( '--test-concurrency' , options . concurrency )
694
+ if ( options . devtools ) {
695
+ args . push ( '--inspect-brk' )
696
+ console . warn ( 'Open chrome://inspect/ for connecting devtools' )
697
+ }
698
+
693
699
const { code } = await launch ( options . binary , [ ...args , ...files ] )
694
700
process . exitCode = code
695
701
}
0 commit comments