Skip to content

Commit 145cf52

Browse files
authored
Merge pull request #5368 from dotty-staging/local-output-channel
VsCode: create local output channel even if tracing is disabled
2 parents d6e67d4 + 779e84f commit 145cf52

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

vscode-dotty/src/tracer.ts

+9-11
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,15 @@ export class Tracer {
8484

8585
run(): vscode.OutputChannel | undefined {
8686
const consentCommandDisposable = vscode.commands.registerCommand(consentCommandName, () => this.askForTracingConsent())
87-
if (this.isTracingEnabled) {
88-
if (this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
89-
this.initializeAsyncWorkspaceDump()
90-
91-
const lspOutputChannel = this.createLspOutputChannel()
92-
const statusBarItem = this.createStatusBarItem()
93-
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
94-
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
95-
}
96-
return lspOutputChannel
87+
if (this.isTracingEnabled && this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
88+
this.initializeAsyncWorkspaceDump()
89+
90+
const lspOutputChannel = this.createLspOutputChannel()
91+
const statusBarItem = this.createStatusBarItem()
92+
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
93+
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
9794
}
95+
return lspOutputChannel
9896
}
9997

10098
private askForTracingConsent(): void {
@@ -111,7 +109,7 @@ export class Tracer {
111109

112110
private initializeAsyncWorkspaceDump() {
113111
const url = this.remoteWorkspaceDumpUrl
114-
if (url === undefined) return
112+
if (!url) return
115113

116114
const doInitialize = () => {
117115
try {

0 commit comments

Comments
 (0)