mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
debug.createProcess better signature
This commit is contained in:
@@ -527,7 +527,7 @@ export interface IDebugService {
|
||||
/**
|
||||
* Creates a new debug process. Depending on the configuration will either 'launch' or 'attach'.
|
||||
*/
|
||||
createProcess(config: IConfig): TPromise<any>;
|
||||
createProcess(config: IConfig): TPromise<IProcess>;
|
||||
|
||||
/**
|
||||
* Restarts a process or creates a new one if there is no active session.
|
||||
|
||||
@@ -664,7 +664,7 @@ export class DebugService implements debug.IDebugService {
|
||||
));
|
||||
}
|
||||
|
||||
public createProcess(config: debug.IConfig): TPromise<any> {
|
||||
public createProcess(config: debug.IConfig): TPromise<debug.IProcess> {
|
||||
return this.textFileService.saveAll().then(() =>
|
||||
this.configurationManager.resloveConfiguration(config).then(resolvedConfig => {
|
||||
if (!resolvedConfig) {
|
||||
@@ -724,7 +724,7 @@ export class DebugService implements debug.IDebugService {
|
||||
);
|
||||
}
|
||||
|
||||
private doCreateProcess(configuration: debug.IConfig): TPromise<any> {
|
||||
private doCreateProcess(configuration: debug.IConfig): TPromise<debug.IProcess> {
|
||||
const sessionId = generateUuid();
|
||||
this.updateStateAndEmit(sessionId, debug.State.Initializing);
|
||||
|
||||
@@ -817,8 +817,8 @@ export class DebugService implements debug.IDebugService {
|
||||
extensionName: `${adapter.extensionDescription.publisher}.${adapter.extensionDescription.name}`,
|
||||
isBuiltin: adapter.extensionDescription.isBuiltin,
|
||||
launchJsonExists: !!this.configurationService.getConfiguration<debug.IGlobalConfig>('launch')
|
||||
});
|
||||
}).then(undefined, (error: any) => {
|
||||
}).then(() => process);
|
||||
}).then(p => p, (error: any) => {
|
||||
if (error instanceof Error && error.message === 'Canceled') {
|
||||
// Do not show 'canceled' error messages to the user #7906
|
||||
return TPromise.as(null);
|
||||
|
||||
Reference in New Issue
Block a user