Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Commit 25a65a7

Browse files
committed
FUSETOOLS2-1055 - provide trace when sending message to webview
Signed-off-by: Aurélien Pupier <[email protected]>
1 parent 1c6f9c6 commit 25a65a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/didactPanel.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export class DidactPanel {
155155
if (sendUri) {
156156
jsonMsg = `{ ${sendCommand}, ${sendUri} }`;
157157
}
158+
console.log('will post message sendSetStateMessage');
158159
this._panel.webview.postMessage(jsonMsg);
159160
}
160161

@@ -370,6 +371,7 @@ export class DidactPanel {
370371
if (!this._panel) {
371372
return;
372373
}
374+
console.log('will post message from postMessage '+message);
373375
const jsonMsg:string = "{ \"command\": \"sendMessage\", \"data\": \"" + message + "\"}";
374376
this._panel.webview.postMessage(jsonMsg);
375377
}
@@ -378,6 +380,7 @@ export class DidactPanel {
378380
if (!this._panel) {
379381
return;
380382
}
383+
console.log('will post message from postRequirementsResponseMessage ');
381384
const jsonMsg:string = "{ \"command\": \"requirementCheck\", \"requirementName\": \"" + requirementName + "\", \"result\": \"" + result + "\"}";
382385
this._panel.webview.postMessage(jsonMsg);
383386
await this.sendSetStateMessage();
@@ -388,6 +391,7 @@ export class DidactPanel {
388391
return;
389392
}
390393
const jsonMsg = `{ "command" : "${msg}"}`;
394+
console.log('will post message from postNamedSimpleMessage '+msg);
391395
this._panel.webview.postMessage(jsonMsg);
392396
}
393397

@@ -416,6 +420,7 @@ export class DidactPanel {
416420
if (!this._panel || this._disposed) {
417421
return;
418422
}
423+
console.log('will post mess age from sendScrollToHeadingMessage');
419424
const jsonMsg = `{ "command": "scrollToHeading", "tag" : "${tag}", "headingText" : "${headingText}" }`;
420425
await this._panel.webview.postMessage(jsonMsg);
421426
}

0 commit comments

Comments
 (0)