Skip to content

Instantly share code, notes, and snippets.

@andreastt
Created December 4, 2018 21:32
Show Gist options
  • Save andreastt/562ce10856ee677776e5a106246362b1 to your computer and use it in GitHub Desktop.
Save andreastt/562ce10856ee677776e5a106246362b1 to your computer and use it in GitHub Desktop.
% node demo.js
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
options {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/protocol"}
userTarget function
devToolsInterface {"host":"localhost","port":9222,"secure":false,"local":false,"path":"/json/list"}
-> {"id":1,"method":"Log.enable","params":{}}
-> {"id":2,"method":"Page.enable","params":{}}
<- {"id":1}
<- {"method":"Page.frameAttached","params":{"frameId":"7F6AEC2D-4703-4B46-9608-863CCDEF2C4F"}}
<- {"method":"Page.frameNavigated","params":{"frame":{"id":"7F6AEC2D-4703-4B46-9608-863CCDEF2C4F","loaderId":null,"url":"https://sny.no/","securityOrigin":null,"mimeType":null}}}
<- {"id":2}
-> {"id":3,"method":"Page.navigate","params":{"url":"https://sny.no/e/consoledemo.html"}}
<- {"id":3,"result":{"frameId":"7F6AEC2D-4703-4B46-9608-863CCDEF2C4F","loaderId":null}}
<- {"method":"Log.entryAdded","params":{"entry":{"source":"","level":"warn","text":"[JavaScript Warning: \"Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.\"]","timestamp":1543959132445}}}
1543959132445 WARN [JavaScript Warning: "Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive."]
<- {"method":"Log.entryAdded","params":{"entry":{"source":"console","level":"debug","timestamp":1543959132457,"url":"https://sny.no/e/consoledemo.html","lineNumber":14,"args":["this is a debug entry!"]}}}
1543959132457 DEBUG this is a debug entry!
<- {"method":"Log.entryAdded","params":{"entry":{"source":"console","level":"log","timestamp":1543959132458,"url":"https://sny.no/e/consoledemo.html","lineNumber":15,"args":["this is a normal log message!"]}}}
1543959132458 LOG this is a normal log message!
<- {"method":"Log.entryAdded","params":{"entry":{"source":"console","level":"warn","timestamp":1543959132459,"url":"https://sny.no/e/consoledemo.html","lineNumber":16,"args":["this is a manacing warning!"]}}}
1543959132459 WARN this is a manacing warning!
<- {"method":"Log.entryAdded","params":{"entry":{"source":"console","level":"exception","timestamp":1543959132459,"url":"https://sny.no/e/consoledemo.html","lineNumber":17,"stackTrace":[{"columnNumber":1,"filename":"https://sny.no/e/consoledemo.html","functionName":"","lineNumber":17}],"args":["and finally, this is a severe exception!"]}}}
1543959132459 EXCEPTION and finally, this is a severe exception!
<- {"method":"Page.domContentEventFired","params":{"timestamp":1543959132461}}
<- {"method":"Page.loadEventFired","params":{"timestamp":1543959132465}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment