Skip to content

Commit

Permalink
code: Don't run lsp-devtools inspect automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Dec 19, 2024
1 parent 09797bf commit e6bb4fe
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions code/src/node/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ export class EsbonioClient {
const config = vscode.workspace.getConfiguration("esbonio")
const debugServer = config.get<boolean>('server.debug')
const serverDevtools = config.get<boolean>('server.enableDevTools')
const sphinxDevtools = config.get<boolean>('sphinx.enableDevTools')
const lsp_devtools = this.resolveCommand("lsp-devtools")?.trim()

const command = []
Expand All @@ -251,11 +250,6 @@ export class EsbonioClient {
// Isolate the Python interpreter from the user's environment - we brought our own.
command.push(...pythonCommand, "-S")

if ((serverDevtools || sphinxDevtools) && lsp_devtools) {
// Requires lsp-devtools to be on the user's PATH.
await this.startDevtools(lsp_devtools, "inspect")
}

if (debugServer) {
let debugCommand = await this.python.getDebugerCommand()
command.push("-Xfrozen_modules=off", ...debugCommand)
Expand Down Expand Up @@ -419,27 +413,4 @@ export class EsbonioClient {
}
}

private async startDevtools(command: string, ...args: string[]) {

if (this.devtools) {
return
}

const task = new vscode.Task(
{ type: 'esbonio-devtools' },
vscode.TaskScope.Workspace,
"lsp-devtools",
"esbonio",
new vscode.ProcessExecution(
command,
args,
{
env: {
PYTHONPATH: join(this.context.extensionPath, "bundled", "libs")
}
}
),
)
this.devtools = await vscode.tasks.executeTask(task)
}
}

0 comments on commit e6bb4fe

Please sign in to comment.