Skip to content

API to expose debugger command to other extensions #3121

@DonJayamanne

Description

@DonJayamanne

Requirements:

  • Determine when extension is ready to use by user
  • Determine when extension is ready to use LS functionality.
    • E.g. IntelliCode needs to know LS has started.
    • Make use of existing API (nothing new will be added)
  • Provide method to return part of the debug launcher command for remote debugging
    • Azure Functions App
  • Document this API
    • On some readme doc in repo
    • On VSCode Docs?
  • Create function tests to ensure APIs work as expected

Here's the current API we return:

interface IExtensionApi {
	ready: Promise<void>;
}

const extension = vscode.extensions.getExtension<IExtensionApi>('ms-python.python');

Here's the proposed API:

interface IExtensionApi {
	ready: Promise<void>;  // **Everything** is ready in the extension.
	debug: {
		/** 
		 * Generate an array of strings for commands to pass to the Python executable to launch the debugger for remote debugging.
		 * Users can append another array of strings of what they want to execute along with relevant arguments to Python. 
		 * E.g `['/Users/..../pythonVSCode/pythonFiles/experimental/ptvsd_launcher.py', '--host', 'localhost', '--port', '57039', '--wait']`
		*/
		getRemoteLauncherCommand(host:string, port: number, waitUntilDebuggerAttaches:boolean = true): Promise<string[]>
	}
}

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityimportantIssue identified as high-priority

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions