From 293f54e8dd9c8d46232a762b807e723eb64ace7a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 12 Sep 2019 11:04:41 -0700 Subject: [PATCH] Improve debug logging by printing character codes --- src/InputHandler.ts | 2 +- src/common/services/CoreService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 56b2d8be..7a0aa8c8 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -329,7 +329,7 @@ export class InputHandler extends Disposable implements IInputHandler { const cursorStartX = buffer.x; const cursorStartY = buffer.y; - this._logService.debug('parsing data', data); + this._logService.debug(`parsing data "${data}"`, data.split('').map(e => e.charCodeAt(0))); if (this._parseBuffer.length < data.length) { this._parseBuffer = new Uint32Array(data.length); diff --git a/src/common/services/CoreService.ts b/src/common/services/CoreService.ts index d17b0c93..71f45e47 100644 --- a/src/common/services/CoreService.ts +++ b/src/common/services/CoreService.ts @@ -54,7 +54,7 @@ export class CoreService implements ICoreService { } // Fire onData API - this._logService.debug('sending data', data); + this._logService.debug(`sending data "${data}"`, data.split('').map(e => e.charCodeAt(0))); this._onData.fire(data); } }