user2999044
user2999044

Reputation: 13

how to check the console.log output of devtools source code in chrome

Have anyone known where is the output of console.log in the InspectorBackend.js of devtools code. I found the console panel in the chrome have no any output.

for example, I have set dumpInspectorProtocolMessages = true, and and also add console.error in the function _wrapCallbackAndSendMessageObject as following:

   console.error("show error on console");
   if (this.dumpInspectorProtocolMessages)
        console.log("frontend: " + JSON.stringify(messageObject));

I think the console panel in the chrome was loaded after above function, so where is the output, how to check it?

Btw, the function above is devtools source code, and what i want to see is the log output of devtools source code.

thanks

Upvotes: 1

Views: 3776

Answers (4)

Andrey Lushnikov
Andrey Lushnikov

Reputation: 3313

In order to see output of console.log's located right into DevTools own source code, you need to open DevTools on DevTools. It's pretty easy:

  1. Undock DevTools window. (This is important: otherwise step 2 won't be possible)
  2. Right-click inside undocked devtools and click "inspect element".

This will open a second DevTools window which will be inspecting first DevTools; all the output from the first devtools frontend could be found there.

Upvotes: 4

Prateek
Prateek

Reputation: 6965

In Google chrome use F12. For more check this link Opening DevTools.

Upvotes: 0

Krish R
Krish R

Reputation: 22711

You can use shift+ctrl+i, it open Developer Tools in Bottom and Find the Console tab click to view the console logs

Upvotes: 0

Vicky Gonsalves
Vicky Gonsalves

Reputation: 11707

In Google Chrome Hit F12 on your keyboard and navigate to console tab or right click on your page and click inspect element

Upvotes: 0

Related Questions