# Print using browser console.log();?

**URL:** <https://forum.inductiveautomation.com/t/print-using-browser-console-log/104027>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 21, 2025, 6:40pm UTC](https://forum.inductiveautomation.com/t/print-using-browser-console-log/104027 "2025-03-21T18:40:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shea\_Molthen](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@Shea\_Molthen](https://forum.inductiveautomation.com/u/Shea_Molthen)\
**Post date:** [March 21, 2025, 6:40pm UTC](https://forum.inductiveautomation.com/t/print-using-browser-console-log/104027/1 "2025-03-21T18:40:54Z")

</div>

Is it possible to print to the browser's console.log(); with a function rather than using system.perspective.print()?

console.log() will print the object and allow browsing via an expandable tree; I was able to get this working from the markdown component but via a script would be very useful. See picture:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bbb1a7e3f895c695b6a886d9c87f6152c088d70f.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 21, 2025, 8:42pm UTC](https://forum.inductiveautomation.com/t/print-using-browser-console-log/104027/2 "2025-03-21T20:42:58Z")

</div>

No, there's no way to access the richer object printing functionality available in the true browser console. `system.perspective.print` goes to the 'lowest common denominator' that can be shared between the different possible targets easily.

Somebody like @bmusson might be talked into adding a scripting function that outputs a rich object more directly, but I wouldn't expect this to happen first party anytime soon.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [March 21, 2025, 9:14pm UTC](https://forum.inductiveautomation.com/t/print-using-browser-console-log/104027/3 "2025-03-21T21:14:34Z")

</div>

You can do this today with [Periscope's runJavaScriptAsync](https://docs.mussonindustrial.com/ignition/embr-periscope/scripting/perspective/system-perspective-runJavaScriptAsync) and a simple helper function:

```python
def prettyPrint(obj):
	system.perspective.runJavaScriptAsync('''(obj) => {
		console.log(obj)
	}''', { 'obj': obj })
	
	
thing = {
	'key1': 'value1',
	'key2': [0, 1, 2, 3],
	'key3': {
		'key3.1': 1,
		'key3.2': 2,
		'key3.3': 3
	}
}
	
prettyPrint(thing)

```

 ![chromium_avRa7nvKPt](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/04b59564d77eccde456b521e43dba4049dcc1288.png)
