Skip to content
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

hitting a breakpoints freezes the entire IDE. #709

Closed
Alaboudi1 opened this issue Aug 4, 2019 · 14 comments
Closed

hitting a breakpoints freezes the entire IDE. #709

Alaboudi1 opened this issue Aug 4, 2019 · 14 comments
Assignees

Comments

@Alaboudi1
Copy link

Why hitting a debugger; statement in js code from the preview window also freezes the IDE? Is this the expected behavior?

@svenefftinge
Copy link
Member

Yes, websites with iframes run in a single loop. You need to open the preview in a new browser tab to get around that.

@svenefftinge
Copy link
Member

svenefftinge commented Aug 5, 2019

Sorry, I don't think we can do anything about it as it is how browsers work.

@svenefftinge
Copy link
Member

To open the preview in a browser tab click the icon on the top right.

@svenefftinge
Copy link
Member

@akosyakov could you verify?

@svenefftinge svenefftinge reopened this Aug 5, 2019
@akosyakov
Copy link
Member

akosyakov commented Aug 5, 2019

All windows on the same origin share an event loop as they can synchronously communicate

From http://hassansin.github.io/shared-event-loop-among-same-origin-windows

Because of it, I'm not sure that opening another window will help. It should still use the same event loop if it comes from the same origin.

I think ideally we should run all theia iframes sandboxed somehow, i.e. on different origins, that they don't share event loop and other common state as cookies and local storage.

@AlexTugarev
Copy link
Member

@akosyakov see last paragraph:

It turns out we can pass an option noopener in window.open()

@akosyakov
Copy link
Member

@AlexTugarev but then we won't be able to communicate with that window? i.e. right now there is no way to detect iframe focus except installing a listener inside iframe and forward them to host window. I hope we will fix it in this way that focus given properly.

@svenefftinge
Copy link
Member

So sounds like adding rel=noopener is still missing for our open in browser command?

@akosyakov
Copy link
Member

An issue in upstream: eclipse-theia/theia#5857

@akosyakov akosyakov self-assigned this Aug 5, 2019
@Alaboudi1
Copy link
Author

I believe this has been fixed 👍.

@jankeromnes
Copy link
Contributor

@Alaboudi1 indeed thanks, good catch! 💯

The fix was merged 21 days ago and deployed as a hotfix 16 days ago. 🎉

@DanTup
Copy link

DanTup commented Dec 3, 2019

I'm hitting this issue today, it doesn't seem fixed?

@svenefftinge
Copy link
Member

It was reintroduced lately by some changes we made in Theia. Thanks for the PR you provided, we will put it into production ASAP.

@svenefftinge
Copy link
Member

In production now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants