Skip to content

Conversation

@colin-grant-work
Copy link
Contributor

What it does

Before the switch to NPM, the extension host plugin setup for Electron used Yarn's wrapping of the node_modules/.bin binaries to invoke the theia command. With the switch to NPM, that no longer works, and extension host debugging doesn't successfully launch a new window in Electron. This PR adds a script to the Electronpackage.json to invoke theia start with no additional arguments and then uses it in the extension host debug startup process.

How to test

  1. Attempt to debug a VSCode extension in Theia's electron app.
  2. An extension host window should pop up and you should be able to debug your extension.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work requested a review from tsmaeder May 29, 2025 20:02
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog May 29, 2025
@colin-grant-work colin-grant-work changed the title Start debug instance without Yarn Start extension host debug instance without Yarn May 29, 2025
@tsmaeder
Copy link
Member

@colin-grant-work while this works in the electron example, it does not help for Theia IDE, where npm is not available. @sgraband didn't you work on a fix for this once?

@tsmaeder
Copy link
Member

Found the issue: eclipse-theia/theia-ide#281

@tsmaeder
Copy link
Member

@colin-grant-work since plugin-dev is a package that can be consumed by adopters, anything using npm is not the right fix, IMO, since npm will not be available at run time. We really need to figure out the correct start incantation for starting the plugin host, like we do in the browser case.

@colin-grant-work
Copy link
Contributor Author

I was suspicious of this solution - and suspicious of its previous yarn iteration - I'll see whether I can track down a more generally applicable mechanism.

@sgraband
Copy link
Contributor

sgraband commented Jun 6, 2025

@colin-grant-work Here is a PR (i ran out of time and ideas back then) with some feedback of @tsmaeder: eclipsesource#96

Maybe this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

4 participants