joewalker / devtools.html

19 stars 7 forks source link

Integrated valence #15

Closed campd closed 8 years ago

campd commented 8 years ago

In case anyone is interested, here's a quick hack-n-slash job to do the valence work in-page.

This doesn't obviate the need for a proxy, because a) we still need it for firefox and b) we can't access chrome's tab list from the page (same origin policy) so we need to proxy that. But you should be able to debug chrome from chrome without Firefox running.

jlongster commented 8 years ago

I tried this and couldn't get it to work. I see the following:

screen shot 2015-12-02 at 8 41 08 pm

I may have set things up wrongly. I ran gulp start, started Chrome with a debugging port of 9222 and then tried to open the toolbox in Firefox. I also changed the getWSTarget function to use valence.

jlongster commented 8 years ago

(This would be hugely helpful debugging problems, now I can just add console.log's in that code. would be super nice)

jlongster commented 8 years ago

Just noticed this:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8081/chrome-tab-list/json

Just realized I have to run it through our local server now, not my static fileserver. I'll see if that works.

jlongster commented 8 years ago

Ok got it working going to the right URL.

This seems to break the debugger. Here DebuggerServer is not defined: https://github.com/joewalker/devtools.html/blob/master/server/actors/string.js#L22 See it's commented out at the top, because that file does not exist here. I haven't tried the inspector.

campd commented 8 years ago

You know, I don't pull request much :/

Fixed the string problem, rebased the commits. New pull should fix it. Let me know how it goes.

jlongster commented 8 years ago

This works great for me, and removes some of the abstraction which is nice. It's easier to figure out what's going on. I was able to get node working by manually tweaking the valence code which was way harder than before (not going to commit that).

I've been testing that and it works. I'm going to merge it but we can revert it tomorrow if anyone has problems.