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

BrowserWindowProxy debug #45

Open
riteshatsencha opened this issue Dec 16, 2016 · 10 comments
Open

BrowserWindowProxy debug #45

riteshatsencha opened this issue Dec 16, 2016 · 10 comments
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted

Comments

@riteshatsencha
Copy link

riteshatsencha commented Dec 16, 2016

Issuehunt badges

Does electron-debug support BrowserWindowProxy? It seems like BrowserWindowProxy has very limited features and I can't seem to figure out how to debug.

I have an app that opens a proxy window. Kind'a stumped on debugging it.

Thx

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

@sindresorhus
Copy link
Owner

Not at the moment. I don't really see an obvious way to support it, but happy to take a pull request if there is.

@parro-it
Copy link
Contributor

@riteshatsencha you can debug it remotely, using command argument `--remote-debugging-port=' and later connecting to that port via http (from chrome).

Actually I'm working on a tool to simplify exactly this use case: it let you open multiple devtools within the same window, each one debugging a different renderer process:

image

in the tab showed I'm debugging a page I opened with window.open

It support browser windows, webview and window proxies (also main process when Electron will support node --inspect flag)

@riteshatsencha
Copy link
Author

@parro-it Thanks for the response. Yeah, tried it. Doesn't work.

Remote debugging for the main browser window works just fine. I can work with the dev tools like expected.

As soon as I open a BrowserWindowProxy none of the console logs are displayed in the console. Heck there is no way to open dev tools for BrowserWindowProxy, unless I am missing something.

@parro-it
Copy link
Contributor

@riteshatsencha that's strange, it's working for me.
Are you doing the following steps, in order?

  1. --remote-debugging-port= command line arg when you launch electron?
  2. open your window with window.open as you usually do
  3. connecting to http://localhost: using chrome you should see a devtools instance connected to the page you opened. What do you see instead?

You should see in chrome a list of links. Could you post it?
One of this links should show an instance of devtools

@riteshatsencha
Copy link
Author

@parro-it as per the steps above...

  1. Launched electron with remote-debugging-port option.
  2. App launches main window and I can see the dev tools attached to it. I can print console logs. All good here.
  3. Next, this main browser window opens another window which is a window proxy. This is where I have an issue. I just can't seem to open dev tools for the proxy window. May be it just doesn't support it.

Where exactly should I be looking for links? Let me know and I will be happy to post it here.

Thx

@parro-it
Copy link
Contributor

After step 3), you have to open chrome and navigate to http://localhost:
Port is the debugging port you put in cmd line arg in step 1.

You should see a list of link, one for each renderer process in your app. Clicking them, you get a devtools (in chrome, not in your window) connected to the process you clicked.

One of the process should be the window.opened one...

@riteshatsencha
Copy link
Author

Here are the links from http://localhost:9222.

remote-debugger-links

@parro-it
Copy link
Contributor

Have you tried them?

@riteshatsencha
Copy link
Author

Yeah, so clicking on both links I see this error in the console.

dev-tools-error

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 2, 2019
@IssueHuntBot
Copy link

@IssueHunt has funded $40.00 to this issue.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted
Projects
None yet
Development

No branches or pull requests

4 participants