-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Investigate improving the development support for TS server plugins #26235
Comments
@egamma's development setup is described in https://github.com/angelozerr/tslint-language-service/blob/master/README.md. |
@mattbierner I've reviewed the setup from the previous comment with @kieferrm. The setup has the issue that you need two different instances of VS Code and you debug in the instance where you do not expect it... To support a better setup the Typescript extension should support an (internal) setting like
With this setup the user opens a the dev folder in one window and the test folder in another one (similar to when developing an extension). To debug the plugin the user can run F5 from the development window to debug the typescript server running in the test folder.
|
@egamma Would using the {
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"env": {
"TSS_DEBUG": "9000"
},
"stopOnEntry": false,
"sourceMaps": true,
"preLaunchTask": "npm"
}, {
"type": "node",
"request": "attach",
"name": "Attach to TSServer",
"port": 9000
}
],
"compounds": [
{
"name": "Compound",
"configurations": ["Launch Extension", "Attach to TSServer"]
}
]
} This compound debug config isn't perfect since the tsserver doesn't actually startup until the TS extension is activated, but it should give you a consistent port to targeted |
@mjbvz this setup makes a lot of sense, when you develop the ts-plugin as a VSCode extension. However, a ts-plugin is VS Code independent. It is just a node module that can be used by any editor/ide, it is not a VS Code extension. In fact the original developer of the tslint plugin node module is using Eclipse. The setup is that the tslint plugin is in a separate git repo. The node module is published to npm from this repo. The published node_module is then added as a dependency in the VS Code extension, pls see https://github.com/Microsoft/vscode-ts-tslint/blob/master/package.json#L43. In this way the node_module can also be consumed from eclipse, etc. One idea would be to create a setup where the tslint plugin repo is used as submodule of the vscode repo, but I haven't looked into this one. |
Ok. A different approach that @kieferrm and I discussed may more what you are after. The goal with this approach was to allow testing a tsserver plugin using vscode, but without taking any actual decencies on vscode. To do this, we could create a vscode extension whose only purpose is to load a tsserver plugin that acts as a proxy for the actually plugin that you are working on at the root of your workspace. Say you are working on the tslint-plugin, here's what your workspace may look like:
The development experience would be similar to that of a VS Code extension. In this case, you still would be using VSCode for testing and development, but none of the code in your workspace would be VSCode specific Would an approach like this help out at all? |
@egamma Is there anything further we need to do for this issue? |
@mjbvz there are several blocking issues to bring the ts-server based tslint support on par with the current vscode-tslint extension. I've therefore put this work on hold for now. Since the angular-language-service plugin seems to make progress I suggest to hold back on additional work for now and close this issue or move it to the backlog. |
Investigate current TS server plugin development experience and understand how it can be improved
The text was updated successfully, but these errors were encountered: