Skip to content

Commit

Permalink
Fix #6380: Add configuration attribute to DebugSession
Browse files Browse the repository at this point in the history
Signed-off-by: Brokun <brokun0128@gmail.com>
  • Loading branch information
BroKun committed Oct 14, 2019
1 parent b98c5fb commit 1274c8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-ext/src/plugin/node/debug/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export class DebugExtImpl implements DebugExt {
id: sessionId,
type: debugConfiguration.type,
name: debugConfiguration.name,
configuration: debugConfiguration,
customRequest: (command: string, args?: any) => this.proxy.$customRequest(sessionId, command, args)
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket';
export class PluginDebugAdapterSession extends DebugAdapterSessionImpl implements theia.DebugSession {
readonly type: string;
readonly name: string;
readonly configuration: theia.DebugConfiguration;

constructor(
protected readonly communicationProvider: CommunicationProvider,
Expand All @@ -37,6 +38,7 @@ export class PluginDebugAdapterSession extends DebugAdapterSessionImpl implement

this.type = theiaSession.type;
this.name = theiaSession.name;
this.configuration = theiaSession.configuration;
}

async start(channel: IWebSocket): Promise<void> {
Expand Down
5 changes: 5 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7523,6 +7523,11 @@ declare module '@theia/plugin' {
*/
readonly name: string;

/**
* The "resolved" [debug configuration](#DebugConfiguration) of this session.
*/
readonly configuration: DebugConfiguration;

/**
* Send a custom request to the debug adapter.
*/
Expand Down

0 comments on commit 1274c8d

Please sign in to comment.