Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 76324b8

Browse files
rodrigcqiyigg
authored andcommitted
fix(cli): add more verbose warning if '_debugger' module cannot be found. (#4800)
1 parent f8f490a commit 76324b8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

lib/debugger/debuggerCommons.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
var baseDebugger = require('_debugger');
1+
var baseDebugger;
2+
try {
3+
baseDebugger = require('_debugger');
4+
} catch (e) {
5+
if (e.code == 'MODULE_NOT_FOUND') {
6+
console.log('***********************************************************');
7+
console.log('* WARNING: _debugger module not available on Node.js 8 *');
8+
console.log('* and higher. *');
9+
console.log('* *');
10+
console.log('* Use \'debugger\' keyword instead: *');
11+
console.log('* https://goo.gl/MvWqFh *');
12+
console.log('***********************************************************');
13+
}
14+
throw e;
15+
}
216
var path = require('path');
317

418
/**

0 commit comments

Comments
 (0)