Skip to content

Conversation

@keertip
Copy link
Contributor

@keertip keertip commented Sep 2, 2025

…o enable access to web socket connections for VM Service and DTD.

  • These changes were tested in FS and was able to open DevTools all the tries. No issues with VM Service connection or the DTD connection
  • Did not remove the delay you added before testing.

…o enable access to web socket connections for VM Service and DTD.
Comment on lines 36 to 40
protected get currentSession(): DartDebugSessionInformation | undefined {
// Get the first debug session if present. Should we get the current session instead?
// Just using the first one works with opening devTools, even when debugging a subsequent session.
return debugSessions && debugSessions.length ? debugSessions[0] : undefined;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be able to pass through the same VM Service URL that is going on the queryString so we don't have to worry about the possibility of getting the wrong one here. It might need a little refactoring though (so that where we currently just pass around a URL, we pass around something like a { viewUrl: string, vmServiceUrl?: string}). I will take look and if it works push changes for you to review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DanTup
Copy link
Member

DanTup commented Sep 3, 2025

I've pushed some changes. It ended up being more than I'd planned because once I made the set of auto-requiring URLs an array, I needed to create the iframes dynamically, but I think this will make it easier if we need to add more in future (I also expanded it to ensure we we support this for all of the different iframes, whether it's DevTools sidebar, DevTools editor tabs, Property Editor, etc.).

I still need to do some proper testing on FS as so far my testing was all locally with the flags to trigger this hard-coded.

@DanTup DanTup requested a review from Copilot September 3, 2025 13:16
@DanTup
Copy link
Member

DanTup commented Sep 3, 2025

/gemini review
@codex review

@gemini-code-assist

This comment was marked as outdated.

chatgpt-codex-connector[bot]

This comment was marked as outdated.

This comment was marked as outdated.

@DanTup
Copy link
Member

DanTup commented Sep 3, 2025

@keertip I've done some testing of this PR with my tweaks both on Firebase Studio and locally, and I think everything is working as expected. I was unable to trigger any errors on Firebase Studio.

I have not yet tried removing the startup delay - I suspect we don't need it, but I think we should try to land this as-is first, and then do some testing of that separately.

It would be good to also have you re-test since I think you were triggering the issue more than I was. If you don't want to build locally, there's a preview build from this PR branch here (dart-code-3.120.0-dev.fs.2.vsix):

https://drive.google.com/drive/u/0/folders/1PM66L6kN_OVzS9RXgJ0ceWtr46gT_yob

@keertip
Copy link
Contributor Author

keertip commented Sep 3, 2025

@DanTup , changes look good! Will retest it today to confirm that it works.

@keertip
Copy link
Contributor Author

keertip commented Sep 4, 2025

Retested, and confirmed that it works as expected! Thanks for shepherding the change.

@DanTup DanTup merged commit 4d8a698 into Dart-Code:master Sep 4, 2025
13 checks passed
@DanTup DanTup added this to the v3.120.0 milestone Sep 4, 2025
@DanTup DanTup changed the title For testing: Add code for authentication from the DevTools iframe t… Add code for authentication from the DevTools iframe to enable access to web socket connections for VM Service and DTD Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants