-
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
Support executing debug in the browser #10748
Conversation
6e92ea1
to
7ef5794
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are looking quite good to me. Please document the moved files and everything else in the breaking changes section for this release.
- Debugging in the browser using the provided extension works correctly
- Normal debug providers continue to work as expected (Tested with JS debugger for Node.js)
* @param contributions available debuggers contributions | ||
*/ | ||
registerDebuggersContributions(pluginFolder: string, contributions: PluginPackageDebuggersContribution[]): void { | ||
registerDebuggersContributions(pluginFolder: string, pluginType: theia.PluginType, contributions: PluginPackageDebuggersContribution[]): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a breaking change in the CHANGELOG.md
I could use a bit more description what the idea of this change is. Are you enabling front end plugins to contribute debug adapters? |
Yes, see the example debug extension linked above |
1e3a0e9
to
e58a2a7
Compare
@msujew Added changes to the CHANGELOG.md as requested |
e58a2a7
to
98d7ced
Compare
Never mind me, won't have time to do a real review on this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the changes performed here.
Just one more minor comment: Do you mind reinstating the moved files and simply let them re-export the exports from the common
folder. That way, it doesn't have to be a breaking change. Additionally, you can add a @deprecated
comment so that users switch to the implementation exported from common
.
From our side, the only thing I'm keen to add is to bring a lot of the debug management into the frontend so other extensions play nicely (e.g. viewers which tie into readMemory/writeMemory requests). As it currently stands, implementing #10841 wouldn't work for frontend debuggers. However, I'd like to make this change in a separate PR |
Hmm, happy to, but:
Not against this change, just interested in your thoughts on the above @msujew |
I believe so, since someone might depend on anything that's somehow exported.
Ideally, the the export code should just look like this: /**
* @deprecated since 1.24.0. - Moved to `common`. Import from there, instead.
*/
export * from '../common/...'; Not really messy, and can easily be removed a few versions down the line.
Well, that won't work. But that wouldn't require moving existing parts from
Well these exports are just there to prevent us from instantly breaking existing backend debuggers, so that devs have a larger buffer to update their code base. They are completely justified in using node dependencies in that case. Perhaps I don't understand you correctly. Do you plan to lift the whole debugging lifecycle into the browser frontend in the future? |
98d7ced
to
7e889c7
Compare
This PR is ready for re-review. It has been rebased on the good work from @colin-grant-work and all conflicts resolved. Functionality re-tested. @msujew , apologies it has taken so long to address your comments. All moved functions/exports/classes now have export sin their original locations with deprecation notices to maintain the API Keen to see this merged! |
7e889c7
to
d7dbd8b
Compare
I'll take a look later today or Monday. |
d7dbd8b
to
377232e
Compare
/** | ||
* It is supposed to work at node only. | ||
* @deprecated since 1.27.0. - Moved to `debug`. Import from there, instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should note the change of filename to debug-ext
.
@msujew, I'd be inclined to remove the reexports for several reasons. (1) Since we're going to start doing stable releases later this year, any deprecations now may be longer-lived than they might otherwise be, so it may be better to break now before we commit to some kind of stability. (2) The architecture of the plugin system isn't very conducive to overrides, so it's relatively less likely that downstream apps interact with these classes very much. (3) Deprecations of this kind don't show up very well in IDE's ( On the other hand, it does produce a fair bit of breakage, so there's certainly still some argument for the reexports. What do you think? One alternative would be no reexports in the plugin system, but reexports in |
These are some good arguments @colin-grant-work! I wouldn't insist on the reexports, so I'd be fine with simply removing them 👍 |
Shall I remove the re-exports, then? @colin-grant-work ? |
@thegecko, yes please. Sorry for the back and forth on the question! Ping me when you're done, and I'll run through one last time and approve. |
Signed-off-by: thegecko <[email protected]>
377232e
to
bf3863a
Compare
No probs, latest push has removed the original files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new browser adapters are working well, and the old functionality is intact. 👍
Signed-off-by: robmor01 [email protected]
What it does
How to test
I've created a modified vscode.mock-debug which only runs as a web extension. Download here:
https://github.com/thegecko/vscode-mock-debug/releases/tag/web-1.0.0
Drop it into the plugins folder and run Theia...
Review checklist
Reminder for reviewers