Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions testSupport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ var dc: DebugClient;

setup( () => {
dc = new DebugClient('node', './out/node/nodeDebug.js', 'node');
dc.on("send", (body: string) => console.log("send>>> " + body))
dc.on("recv", (body: string) => console.log("recv<<< " + body))
return dc.start();
});

Expand Down
3 changes: 2 additions & 1 deletion testSupport/src/protocolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class ProtocolClient extends ee.EventEmitter {
this.pendingRequests.set(request.seq, clb);

const json = JSON.stringify(request);
this.emit("send", json);
this.outputStream.write(`Content-Length: ${Buffer.byteLength(json, 'utf8')}\r\n\r\n${json}`, 'utf8');
}

Expand Down Expand Up @@ -132,7 +133,7 @@ export class ProtocolClient extends ee.EventEmitter {
}

private dispatch(body: string): void {

this.emit("recv", body);
const rawData = JSON.parse(body);

if (typeof rawData.event !== 'undefined') {
Expand Down