In Chrome, I can observe a site’s JavaScript/data by right clicking on the page and selecting “Inspect”, and then I click the “Console” tab, and scroll down a bit in a particular site. I might see something like this:
I wanted to find a way to record this JavaScript info to a log, and sure enough, there’s a way to achieve this. Right click on the Chrome shortcut, and set the “Target” to the following:
C:Program FilesGoogleChromeApplicationchrome.exe" --enable-logging --v=1
Chrome then proceeds to update a log file updated at:
C:/Users/[USERNAME]/AppData/Local/Google/Chrome/User Data/chrome_debug.log
Now here’s the problem. Inside that log, I see:
[53942:74227:4921/203256.143:INFO:CONSOLE(3)] "%c Game %c AppInsights.trackEvent: CaseD background: #404040; color: white; display: block; font-weight: bold; background: #FFFFFF; color: #8A8A8A; display: block; [object Object]", source: https://examplesite.com/longtail.js (3)
The [object Object]
bit is the part that is hiding the info given in the image above. What flag can I add to the Chrome shortcut target so that [object Object]
expands to the info shown in the image? For example, I want the chrome_debug.log file to also record the “BoxIndex” and “Cid” strings with the values “1” and “K948”.
I tried to increase the verbosity to 3 (and even 8) with the Target addition --v=3
, but to no avail.
I suspect the answer to my question is within this giant page full of command line switches. However, there are too many to check through manually. Does anyone know what I need to add to the Chrome shortcut Target to achieve what I want?