-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Need support for a "--headless-hosted-plugin-inspect" backend cmdline argument #13462
Milestone
Comments
Some pointers to the Theia code: |
@cdamus FYI |
jfaltermeier
added a commit
that referenced
this issue
Jul 11, 2024
* allow to pass down server name to HostedPluginServer from AbstractHostedPluginSupport * pass down either hosted-plugin or headless-hosted-plugin * add preferences to specify node js debug ports per hosted plugin server * adjust PluginDebugConfiguration to also accept and array of server-name to debug port entries
jfaltermeier
added a commit
that referenced
this issue
Jul 12, 2024
* refactor to directly set servername on backend instead of handing it down from frontend
1 task
jfaltermeier
added a commit
that referenced
this issue
Aug 5, 2024
* address review comments * remove serverName property
Update: we moved our product to the latest Theia yesterday. I updated our vscode launch configs to make use of this new argument. Debugging of both standard and headless plugins now works. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description:
We need support for a
--headless-hosted-plugin-inspect
(or similar name) backend cmdline argument that will tell the headless plugin-host to listen on that port for a debug attachment. Today, both plugin hosts seem to be affected by the traditional--hosted-plugin-inspect
argument, but clearly only one can listen on that port. So the first plugin-host to run gets the port and the other plugin-host becomes un-debuggable. As the headless plugin host always runs first, that's the winner.Note: the notion of headless plugins was introduced in Theia 1.46.0.
Additional Info
Today I tried debugging a headless plugin using VS Code but in an environment focused on just the plugin developer instead of a Theia app developer that is also developing a plugin. Additionally, the plugin package being developed contributes both a standard plugin (runs in Node.js but interacts with app's frontend) and a headless plugin (runs in Node.js but interacts with app's backend).
Under the covers, there is a plugin-host process for the standard plugins (one for each connected frontend), and a single plugin-host process for all the headless plugins
The way you historically use VSCode to debug a plugin in this plugin-centric type of environment is to launch the app's backend using
--hosted-plugin-inspect=<port>
, then use a launch config in VS Code like thisBut as described earlier, only one of the two plugin-host processes will get to use the port specified via
--hosted-plugin-inspect
--the first plugin-host to run.We should have a switch specifically for the headless plugin-host, reserving the current one for the standard plugin host.
Steps to Reproduce:
Attach to Plugin Host
launch configuration.extension-headless.ts
breakpoint resolves and is hitTo prove that both plugin-hosts competed for the debug port, remove these lines from
package.json
That will make the plugin-package have just a standard plugin. You'll see that its breakpoint is now hit.
As further proof, the log/console has this:
Additional Information
The text was updated successfully, but these errors were encountered: