visual-studio-codeapi-designvscode-extensions

Get VSCode Output Channel


I'm aware that an arbitrary output channels can be created via window.createOutputChannel('somename') but I didn't see any API method in the docs for retrieving the current output channels in the window.

Is there some way to get the output that is on the output channel or is it just not exposed anywhere? :(


Solution

  • This is indeed not possible currently. There's an open feature request for it that you can upvote and follow though:

    The issue also mentions that output channels are part of vscode.workspace.textDocuments if they have been viewed recently. There doesn't seem to be a way to reliably identify which document belongs to which output channel however, so it's unlikely you can use this as a workaround.