Skip to content

Commit 717daa4

Browse files
committed
add dumpServedInfo command
1 parent f21acb2 commit 717daa4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,11 @@
11631163
"command": "code-d.setupCompiler",
11641164
"title": "Setup D Compiler",
11651165
"category": "code-d"
1166+
},
1167+
{
1168+
"command": "code-d.dumpServedInfo",
1169+
"title": "Dump serve-d state to output",
1170+
"category": "code-d"
11661171
}
11671172
],
11681173
"jsonValidation": [

src/commands.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,21 @@ export function registerClientCommands(context: vscode.ExtensionContext, client:
396396
});
397397
});
398398
}));
399+
400+
subscriptions.push(vscode.commands.registerCommand("code-d.dumpServedInfo", async () => {
401+
let info = await client.sendRequest("served/getInfo", {
402+
includeConfig: true
403+
});
404+
405+
client.outputChannel.appendLine("");
406+
client.outputChannel.appendLine("---");
407+
client.outputChannel.appendLine("serve-d dump:");
408+
client.outputChannel.appendLine(JSON.stringify(info, null, "\t"));
409+
client.outputChannel.appendLine("---");
410+
client.outputChannel.appendLine("");
411+
412+
client.outputChannel.show(true);
413+
}));
399414
}
400415

401416
export function registerCommands(context: vscode.ExtensionContext) {

0 commit comments

Comments
 (0)