mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
add WorkspaceFolder to proposed debug API
This commit is contained in:
@@ -472,8 +472,8 @@ export function createApiFactory(
|
||||
get activeDebugSession() {
|
||||
return extHostDebugService.activeDebugSession;
|
||||
},
|
||||
startDebugging: proposedApiFunction(extension, (nameOrConfig: string | vscode.DebugConfiguration) => {
|
||||
return extHostDebugService.startDebugging(nameOrConfig);
|
||||
startDebugging: proposedApiFunction(extension, (folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration) => {
|
||||
return extHostDebugService.startDebugging(folder, nameOrConfig);
|
||||
}),
|
||||
startDebugSession(config: vscode.DebugConfiguration) {
|
||||
return extHostDebugService.startDebugSession(config);
|
||||
|
||||
@@ -347,7 +347,7 @@ export abstract class MainThreadSCMShape {
|
||||
export type DebugSessionUUID = string;
|
||||
|
||||
export abstract class MainThreadDebugServiceShape {
|
||||
$startDebugging(nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> { throw ni(); }
|
||||
$startDebugging(folder: URI | undefined, nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> { throw ni(); }
|
||||
$startDebugSession(config: vscode.DebugConfiguration): TPromise<DebugSessionUUID> { throw ni(); }
|
||||
$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): TPromise<any> { throw ni(); }
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic
|
||||
import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID } from 'vs/workbench/api/node/extHost.protocol';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import URI from 'vs/base/common/uri';
|
||||
|
||||
|
||||
export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
@@ -45,9 +46,9 @@ export class ExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
this._debugServiceProxy = threadService.get(MainContext.MainThreadDebugService);
|
||||
}
|
||||
|
||||
public startDebugging(nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> {
|
||||
public startDebugging(folder: vscode.WorkspaceFolder | undefined, nameOrConfig: string | vscode.DebugConfiguration): TPromise<boolean> {
|
||||
|
||||
return this._debugServiceProxy.$startDebugging(nameOrConfig);
|
||||
return this._debugServiceProxy.$startDebugging(folder ? <URI>folder.uri : undefined, nameOrConfig);
|
||||
}
|
||||
|
||||
public startDebugSession(config: vscode.DebugConfiguration): TPromise<vscode.DebugSession> {
|
||||
|
||||
Reference in New Issue
Block a user