Skip to content

fix: fix debugger attaching after a page reload #4241

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

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

DimitarTachev
Copy link
Contributor

@DimitarTachev DimitarTachev commented Dec 19, 2018

PR Checklist

What is the current behavior?

Take a look at the below-mentioned issue.

What is the new behavior?

We are printing the debug proxy port even if we reuse an existing proxy. In this way, VSCode can reattach to the same proxy after a JS file change and we are able to connect and disconnect unlimited number of clients.

Related to #4236

@DimitarTachev DimitarTachev force-pushed the tachev/fix-ios-debug-proxy branch from 60eba82 to 3dd15bc Compare December 20, 2018 09:25
@DimitarTachev DimitarTachev changed the title fix: avoid losing the whole proxy server when closing a single client fix: fix debugger attaching after a page reload Dec 20, 2018
@@ -152,12 +158,11 @@ export class AppDebugSocketProxyFactory extends EventEmitter implements IAppDebu
appDebugSocket.on("close", () => {
this.$logger.info("Backend socket closed!");
webSocket.close();
server.close();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the server socket not closed on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The server socket is appDebugSocket and this is it's close handler. server is our proxy server and it's not closed in order to stay available for new client connections. Because of this line, the Chrome Dev Tools was not able to reconnect when you try to refresh the page.

@KristianDD
Copy link
Contributor

run ci

@DimitarTachev DimitarTachev force-pushed the tachev/fix-ios-debug-proxy branch from 3dd15bc to 9ae9343 Compare January 3, 2019 13:09
@DimitarTachev DimitarTachev merged commit 4683e50 into release Jan 3, 2019
@DimitarTachev DimitarTachev deleted the tachev/fix-ios-debug-proxy branch January 3, 2019 14:22
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

Successfully merging this pull request may close these issues.

3 participants