Chrome DevTools - Jonius7/SteamUI-OldGlory GitHub Wiki
There's so much I could put here, I am putting some advanced tips here to remind myself. I don't expect you to understand what it's about.
Run steam in -dev
mode and press F12 on the Library to open up those Chrome DevTools.
If I'm going through a debug breakpoint in Sources tab, and all the Call Stacks lead to libraries.js
, and I can't find a reference to libraryroot.js
, well, check the Network tab. Look for a relevant network request and under that Call Stack you'll more likely find a reference to libraryroot.js
that actually leads to some more tangible code (libraryreet.js
of course using my tweaked JS). More importantly, you find the triggers for what's causing the behaviour in the library you are currently debugging.
Example: trying to figure out what function it was calling when I typed anything into the Search bar. I spent a good 1/2 hr trying to step through a whole bunch of libraries.js
functions that didn't really get me anywhere, because that's all the Call Stack gave me.
Then I went to Network tab, and sure enough, there was an AJAX (XHR) request called for every time I typed something into the search bar.
https://store.steampowered.com/search/suggest?term=ab&f=json&cc=AU&l=english&origin=https:%2F%2Fsteamloopback.host
Let's break down that URL, shall we?
https://store.steampowered.com/search/suggest
?
term=ab
&
f=json
&
cc=AU
&
l=english
&
origin=https:%2F%2Fsteamloopback.host
You see the term
parameter is basically what's in your search bar.
Hover over the Initiator column and you get this:
Ah there we go, we can see a couple of functions KKYZ.e.SetSearchText
, KKYZ.e.FetchSearchSuggestions
, and so on, that are in libraryreet.js
Now, I have something to work on
In Steam\ThirdPartyLegalNotices.html
under Chromium Embedded Framework:
Source code for the version of CEF and Chromium used by this application can
be found at http://developer.valvesoftware.com/wiki/Chromium_Embedded_Framework.
http://developer.valvesoftware.com/wiki/Chromium_Embedded_Framework