Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected threadsRequest(response: DebugProtocol.ThreadsResponse): void {
// return the default thread
response.body = {
threads: [
new Thread(PythonDebugSession.THREAD_ID, "thread 1")
]
};
this.sendResponse(response);
}
protected async threadsRequest(
response: DebugProtocol.ThreadsResponse
): Promise {
const status = await this.client.status();
const threads = [];
if (status) {
for (const tid of Object.keys(status.threads)) {
threads.push(new Thread(parseInt(tid), `Thread ${tid}`));
}
} else {
threads.push(new Thread(1, "Thread 1"));
}
response.body = {
threads,
};
this.sendResponse(response);
}
harbourDebugSession.prototype.threadsRequest = function(response)
{
response.body =
{
threads:
[ //TODO: suppport multi thread
new debugadapter.Thread(1, "Main Thread")
]
};
this.sendResponse(response)
}
protected threadsRequest(response: DebugProtocol.ThreadsResponse): void {
response.body = {
threads: [
new Thread(this.threadID, "Thread 1")
]
};
this.sendResponse(response);
}
this.pythonProcess.Threads.forEach(t=> {
threads.push(new Thread(t.Id, t.Name));
});
protected threadsRequest(response: DebugProtocol.ThreadsResponse): void {
response.body = {
threads: [
new Thread(SQFDebug.THREAD_ID, "thread 1")
]
};
this.sendResponse(response);
}
return this.threads.map((thread: ThreadInfo) => new Thread(thread.num, thread.ref.name));
}
protected threadsRequest(response: DebugProtocol.ThreadsResponse) {
response.body = { threads: [new Thread(0, 'main')] };
this.sendResponse(response);
}
.map(thread => new vscode_debugadapter_1.Thread(thread.id, "thread " + thread.id))
};
await this.sendErrorIfFailed(response, async () => {
response.body = {
threads: [new Thread(MAIN_THREAD.id, MAIN_THREAD.name)],
};
this.sendResponse(response);
});
}