aroth
aroth

Reputation: 54816

How to get inline function definitions back in Chrome's JavaScript console

Chrome's JavaScript console used to have a very helpful feature where if you entered the name of any function visible in the current scope it would print the complete definition of that function. Essentially as described in this answer here.

Some time ago (I think at least a couple of months, could be more) it stopped doing this, however, and entering a function name now gives a very unhelpful response, like:

enter image description here

I know I can click on that line (or right-click, and choose 'Show Function Definition') to be shown the function-definition in the 'Sources' tab, but that's very clunky compared to the previous inline function definitions (for a workflow that's typically along the lines of 'get the function definition, copy/paste into the console, change a few things, then overwrite the original function definition').

Another trick is to add a + "" after the function name (as in jobClicked + "" instead of jobClicked), which shows the code in the console but loses all of the syntax highlighting.

Is there any way to get the JavaScript console to go back to its previous behavior of displaying the complete function definition inline inside of the JavaScript console, with the syntax-highlighting intact?

Upvotes: 8

Views: 465

Answers (1)

Jithendranath Gupta
Jithendranath Gupta

Reputation: 169

It's working in version 54. You can update your Chrome browser.

Example function table:

Example function table

Chrome version:

Chrome version

Upvotes: 1

Related Questions