I'd like to know if there is a command line API from the Chrome Developer Tools in Console that can be used to view an object?
I'm not looking for something like console.log() which can be placed in the PHP code, but I need to view the variable after the page is rendered on a Production site.
Can this be done via the console?
inspect( {{ myArray }}) valueOf( {{ myArray }}) or values()
Thanks
No, you can't, but you are missing some basic coding and languages fundamentals, like the difference between compiled codes and scripting codes.
In PHP you cannot debug the code in real time like in compiled codes, except if you configure your IDE (like PHPStorm) to make some real time debugging, but that is an advanced task.
Supposing that you are coding on a localhost, what you can do is printing your variable with codes like:
var_dump($your_variable);
print_r($another_variable);
and your values will be printed out, but you need to reload the page.
If you are on a good mood, i recommend you take a look on this XDebug and PHPStorm Real time debugging article! .