Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Call Debugger.setBreakpointsActive after Debugger.enable. Fixes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
auchenberg committed Apr 8, 2017
1 parent db9bce2 commit 16e3a43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/protocols/ios/ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export abstract class IOSProtocol extends ProtocolAdapter {
this._target.addMessageFilter('tools::Debugger.canSetScriptSource', (msg) => this.onCanSetScriptSource(msg));
this._target.addMessageFilter('tools::Debugger.setBlackboxPatterns', (msg) => this.onSetBlackboxPatterns(msg));
this._target.addMessageFilter('tools::Debugger.setAsyncCallStackDepth', (msg) => this.onSetAsyncCallStackDepth(msg));
this._target.addMessageFilter('tools::Debugger.enable', (msg) => this.onDebuggerEnable(msg));
this._target.addMessageFilter('target::Debugger.scriptParsed', (msg) => this.onScriptParsed(msg));

this._target.addMessageFilter('tools::Emulation.canEmulate', (msg) => this.onCanEmulate(msg));
Expand Down Expand Up @@ -234,6 +235,11 @@ export abstract class IOSProtocol extends ProtocolAdapter {
return Promise.resolve(null);
}

private onDebuggerEnable(msg: any): Promise<any> {
this._target.callTarget('Debugger.setBreakpointsActive', { active: true })
return Promise.resolve(msg);
}

private onGetMatchedStylesForNodeResult(msg: any): Promise<any> {
const result = msg.result;

Expand Down

0 comments on commit 16e3a43

Please sign in to comment.