Skip to content

Commit

Permalink
fix: use inspector at 7.x+ (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and fengmk2 committed Sep 14, 2017
1 parent 1c25bad commit 2e3498e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -85,7 +85,7 @@ $ egg-bin dev

Debug egg app with [V8 Inspector Integration](https://nodejs.org/api/debugger.html#debugger_v8_inspector_integration_for_node_js).

automatically detect the protocol used by the targeted runtime, 8.0+ the new 'inspector' protocol is used.
automatically detect the protocol, use the new `inspector` when the targeted runtime >=7.0.0 .

use [inspector-proxy](https://github.com/whxaxes/inspector-proxy) to proxy worker debug, so you don't need to worry about reload.

Expand Down
2 changes: 1 addition & 1 deletion lib/cmd/debug.js
Expand Up @@ -6,7 +6,7 @@ const InspectorProxy = require('inspector-proxy');
const debug = require('debug')('egg-bin');
const semver = require('semver');
const Command = require('./dev');
const newDebugger = semver.gte(process.version, '8.0.0');
const newDebugger = semver.gte(process.version, '7.0.0');

class DebugCommand extends Command {
constructor(rawArgv) {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/cmd/debug.test.js
Expand Up @@ -66,7 +66,7 @@ describe('test/lib/cmd/debug.test.js', () => {

describe('real egg', () => {
const cwd = path.join(__dirname, '../../fixtures/example');
const newDebugger = semver.gte(process.version, '8.0.0');
const newDebugger = semver.gte(process.version, '7.0.0');

it('should proxy', function* () {
const app = coffee.fork(eggBin, [ 'debug' ], { cwd });
Expand Down

0 comments on commit 2e3498e

Please sign in to comment.