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

Commit 16e3a43

Browse files
committed
Call Debugger.setBreakpointsActive after Debugger.enable. Fixes #42
1 parent db9bce2 commit 16e3a43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/protocols/ios/ios.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export abstract class IOSProtocol extends ProtocolAdapter {
6666
this._target.addMessageFilter('tools::Debugger.canSetScriptSource', (msg) => this.onCanSetScriptSource(msg));
6767
this._target.addMessageFilter('tools::Debugger.setBlackboxPatterns', (msg) => this.onSetBlackboxPatterns(msg));
6868
this._target.addMessageFilter('tools::Debugger.setAsyncCallStackDepth', (msg) => this.onSetAsyncCallStackDepth(msg));
69+
this._target.addMessageFilter('tools::Debugger.enable', (msg) => this.onDebuggerEnable(msg));
6970
this._target.addMessageFilter('target::Debugger.scriptParsed', (msg) => this.onScriptParsed(msg));
7071

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

238+
private onDebuggerEnable(msg: any): Promise<any> {
239+
this._target.callTarget('Debugger.setBreakpointsActive', { active: true })
240+
return Promise.resolve(msg);
241+
}
242+
237243
private onGetMatchedStylesForNodeResult(msg: any): Promise<any> {
238244
const result = msg.result;
239245

0 commit comments

Comments
 (0)