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

`--remote-debugging-port` doesn't work since 1.6.11 #10445

Closed
develar opened this issue Sep 5, 2017 · 16 comments
Closed

`--remote-debugging-port` doesn't work since 1.6.11 #10445

develar opened this issue Sep 5, 2017 · 16 comments
Assignees
Labels

Comments

@develar
Copy link
Contributor

@develar develar commented Sep 5, 2017

--remote-debugging-port is used to debug renderer process in the IDE.

It works in the Electron 1.5.1, but doesn't work in the 1.6.11+ (I have checked 1.6.11, 1.7.5 and 1.8.0).

Project — https://github.com/develar/__debug_electron-quick-start

Change electron version in the package.json from "1.5.1" to "1.6.11" to reproduce — WebStorm/VSCode cannot connect to localhost:9222

Debug works only if add app.commandLine.appendSwitch('remote-debugging-port', '9222') to main.js

Is it regression or intended change?

@MarshallOfSound

This comment has been minimized.

Copy link
Member

@MarshallOfSound MarshallOfSound commented Sep 6, 2017

I know in 1.7+ the debugging technique changed to use new new --inspect and that's how I debug things through VS Code now, might be worth playing with that?

@develar

This comment has been minimized.

Copy link
Contributor Author

@develar develar commented Sep 6, 2017

@MarshallOfSound --inspect is used to debug main process, --remote-debugging-port to debug renderer.

@ramya-rao-a

This comment has been minimized.

Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Nov 30, 2017

What about the case when there are multiple renderers?

@sofianguy

This comment has been minimized.

Copy link
Member

@sofianguy sofianguy commented Dec 3, 2017

Thanks for reaching out!

Because we treat our issues list as the team's backlog, we close issues that are questions since they don't represent a task needing to be completed. For most questions about Electron there are a lot of options.
Check out the Electron community. There are also a bunch of helpful people in this community forum that should be willing to point you in the right direction.

@sofianguy sofianguy closed this Dec 3, 2017
@develar

This comment has been minimized.

Copy link
Contributor Author

@develar develar commented Dec 3, 2017

@sofianguy it is bug and not a question ;)

@sofianguy sofianguy added bug 🐞 and removed triaged/helpme labels Dec 6, 2017
@sofianguy

This comment has been minimized.

Copy link
Member

@sofianguy sofianguy commented Dec 6, 2017

@develar my bad, reopening

@sofianguy sofianguy reopened this Dec 6, 2017
@hatpick

This comment has been minimized.

Copy link

@hatpick hatpick commented Apr 24, 2018

Any update on this? Adding the following on main configuration has no effect.

"runtimeArgs": [        
   "--remote-debugging-port=9222"
 ]

I'm doing:

app.commandLine.appendSwitch('remote-debugging-port', '9222');

instead.

@MarshallOfSound

This comment has been minimized.

Copy link
Member

@MarshallOfSound MarshallOfSound commented Aug 21, 2018

Can y'all test this on 2.0.7 / 3.0.0-beta.6. I tested this locally and it appears to be working now 🤔

@prigara

This comment has been minimized.

Copy link

@prigara prigara commented Aug 21, 2018

Hey, @MarshallOfSound! I'm from the WebStorm team. I can confirm that the debug flag now works correctly with Electron 2.0.7 and 3.0.0-beta.6. Thanks for looking into it and getting back to us on Twitter!

@MarshallOfSound

This comment has been minimized.

Copy link
Member

@MarshallOfSound MarshallOfSound commented Aug 21, 2018

@prigara No problem, good to hear it's cleared itself up. I'm going to leave this open so I can write some tests to make sure this doesn't break in the future but at least we know it's working as expected now :)

@natew

This comment has been minimized.

Copy link
Contributor

@natew natew commented Sep 5, 2018

@MarshallOfSound this seems to have regressed for me. I'm actually getting a timeout for some reason. I tired electron 3.0.0 beta 3, 5, and 8.

It was working before, but suddenly stopped. It's odd it will actually hang for a while and then timeout:

 ETIMEDOUT 127.0.0.1:9002 FetchError: request to http://127.0.0.1:9002/json failed, reason: connect ETIMEDOUT 127.0.0.1:9002

Using node 9.11.2. I haven't seen anyone log a timeout issue, should I open a new ticket?

@MarshallOfSound

This comment has been minimized.

Copy link
Member

@MarshallOfSound MarshallOfSound commented Sep 5, 2018

It was working before, but suddenly stopped. It's odd it will actually hang for a while and then timeout:

Sounds like you have some phantom processes hanging around with a claim on the debugger ports still. Do a clean restart and try again, especially if it was working before 👍

@natew

This comment has been minimized.

Copy link
Contributor

@natew natew commented Sep 5, 2018

@mihe

This comment has been minimized.

Copy link

@mihe mihe commented May 28, 2019

So I just gave Electron 6.0.0-beta.4 a try, and it seems this issue has been fixed there. I can now start Electron with --remote-debugging-port=9222 in a VS Code launch configuration, which wasn't possible with Electron 5.

@natew

This comment has been minimized.

Copy link
Contributor

@natew natew commented Jun 5, 2019

I can confirm electron 6 beta 3 seems to have fixed it, which is a huge help for us. Thank you.

@MarshallOfSound

This comment has been minimized.

Copy link
Member

@MarshallOfSound MarshallOfSound commented Jun 5, 2019

Closing this out as I've been using --remote-debugging-port for a looonngggg time (since the days of 3.x and it's been working for me. + reports above that others have it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.