Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use inspector at 7.x+ #74

Merged
merged 1 commit into from
Sep 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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