Skip to content

Node.js based forum software built for the modern web

Run grunt with debugger enabled (#8911)

Tudor-Dan Ravoiu39279a1e547e
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,
});
}