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

Commit 4f8bf82

Browse files
AnshulMalikdarkwing
authored andcommitted
add methods to debugger client for xhr breakpoints
1 parent 18fc0b9 commit 4f8bf82

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

  • packages/devtools-connection/src/debugger

packages/devtools-connection/src/debugger/client.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,30 @@ ThreadClient.prototype = {
24792479
this.client._eventsEnabled && this.emit(aPacket.type, aPacket);
24802480
},
24812481

2482+
/**
2483+
* Requests to set XHR breakpoint
2484+
* @param string path
2485+
* pause when url contains `path`
2486+
* @param string method
2487+
* pause when method of request is `method`
2488+
*/
2489+
setXHRBreakpoint: DebuggerClient.requester({
2490+
type: "setXHRBreakpoint",
2491+
path: args(0),
2492+
method: args(1)
2493+
}),
2494+
2495+
/**
2496+
* Request to remove XHR breakpoint
2497+
* @param string path
2498+
* @param string method
2499+
*/
2500+
removeXHRBreakpoint: DebuggerClient.requester({
2501+
type: "removeXHRBreakpoint",
2502+
path: args(0),
2503+
method: args(1)
2504+
}),
2505+
24822506
getLastPausePacket: function() {
24832507
return this._lastPausePacket;
24842508
},

0 commit comments

Comments
 (0)