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

Commit a8b8c1b

Browse files
authored
Merge pull request #1098 from AnshulMalik/xhr-breakpoints
add methods to debugger client for xhr breakpoints
2 parents 18fc0b9 + a1e67ca commit a8b8c1b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
.*node_modules/postcss-*
1313
.*node_modules/radium.*
1414
.*node_modules/react-style-proptype.*
15+
.*node_modules/chalk*
1516
.*flow-coverage-report/.*
1617
.*custom_format_broken.json
1718

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)