Introduce DEBUG module which traces public API calls

This patch improves on DEBUG module to trace all puppeteer's
public API calls.

References #89.
This commit is contained in:
Andrey Lushnikov
2017-07-18 20:53:00 -07:00
parent f154d537f7
commit 55acae40fd
8 changed files with 55 additions and 1 deletions

View File

@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
let EventEmitter = require('events');
const EventEmitter = require('events');
const helper = require('./helper');
class NetworkManager extends EventEmitter {
/**
@@ -280,6 +281,7 @@ class Body {
return content.buffer;
}
}
helper.tracePublicAPI(Body);
class Request extends Body {
/**
@@ -300,6 +302,7 @@ class Request extends Body {
return this._response;
}
}
helper.tracePublicAPI(Request);
class Response extends Body {
/**
@@ -324,6 +327,7 @@ class Response extends Body {
return this._request;
}
}
helper.tracePublicAPI(Response);
class InterceptedRequest {
/**