diff --git a/Gruntfile.js b/Gruntfile.js index e25d9e12dd..e2a811cd11 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -143,8 +143,17 @@ module.exports = function (grunt) { if (worker) { worker.kill(); } + + const execArgv = []; + const inspect = process.argv.find(a => a.startsWith('--inspect')); + + if (inspect) { + execArgv.push(inspect); + } + worker = fork('app.js', args, { - env: env, + env, + execArgv, }); }