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

Commit ad525ed

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/didactPanel.ts

Lines changed: 6 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

@@ -326,6 +327,7 @@ export class DidactPanel {
326327
}
327328

328329
public async dispose(): Promise<void> {
330+
console.log('dispoe called!');
329331
if (this._disposed) {
330332
return;
331333
}
@@ -370,6 +372,7 @@ export class DidactPanel {
370372
if (!this._panel) {
371373
return;
372374
}
375+
console.log('will post message from postMessage '+message);
373376
const jsonMsg:string = "{ \"command\": \"sendMessage\", \"data\": \"" + message + "\"}";
374377
this._panel.webview.postMessage(jsonMsg);
375378
}
@@ -378,6 +381,7 @@ export class DidactPanel {
378381
if (!this._panel) {
379382
return;
380383
}
384+
console.log('will post message from postRequirementsResponseMessage ');
381385
const jsonMsg:string = "{ \"command\": \"requirementCheck\", \"requirementName\": \"" + requirementName + "\", \"result\": \"" + result + "\"}";
382386
this._panel.webview.postMessage(jsonMsg);
383387
await this.sendSetStateMessage();
@@ -388,6 +392,7 @@ export class DidactPanel {
388392
return;
389393
}
390394
const jsonMsg = `{ "command" : "${msg}"}`;
395+
console.log('will post message from postNamedSimpleMessage '+msg);
391396
this._panel.webview.postMessage(jsonMsg);
392397
}
393398

@@ -416,6 +421,7 @@ export class DidactPanel {
416421
if (!this._panel || this._disposed) {
417422
return;
418423
}
424+
console.log('will post mess age from sendScrollToHeadingMessage');
419425
const jsonMsg = `{ "command": "scrollToHeading", "tag" : "${tag}", "headingText" : "${headingText}" }`;
420426
await this._panel.webview.postMessage(jsonMsg);
421427
}

0 commit comments

Comments
 (0)