Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to expose debugger command to other extensions #3121

Closed
3 of 5 tasks
DonJayamanne opened this issue Nov 1, 2018 · 2 comments
Closed
3 of 5 tasks

API to expose debugger command to other extensions #3121

DonJayamanne opened this issue Nov 1, 2018 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality important Issue identified as high-priority

Comments

@DonJayamanne
Copy link

DonJayamanne commented Nov 1, 2018

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[]>
	}
}
@DonJayamanne DonJayamanne added feature-request Request for new features or functionality feature-* important Issue identified as high-priority needs proposal Need to make some design decisions labels Nov 1, 2018
@brettcannon brettcannon changed the title API to expose functionality to Extension API to expose debugger command to other extensions Nov 1, 2018
@vivlimmsft
Copy link

It would be handy to provide the LS version to extenders as well. Then IntelliCode can do a runtime check on the version of LS and gracefully show a notification if there is a mismatch.

@brettcannon
Copy link
Member

@vivlimmsft we are currently planning to pin to the language server version for each release once the language server goes stable, so an API for that shouldn't be necessary short/medium-term.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

3 participants