<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Share: logging PHP in console for debugging]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7096&amp;type=atom" />
	<updated>2017-11-04T14:57:01Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7096</id>
		<entry>
			<title type="html"><![CDATA[Re: Share: logging PHP in console for debugging]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29455#p29455" />
			<content type="html"><![CDATA[<p>@barbarian: Thanks for sharing.</p><p><a href="https://frontaccounting.com/fawiki/index.php?n=Devel.TrobleshootingFrontAccounting">Wiki</a>-ed it.</p><p><a href="http://www.chromelogger.com">ChromeLogger</a> is available for quite a few programming languages.</p><p>The entire Troubleshooting FA wiki page as on date is attached for offline usage.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-04T14:57:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29455#p29455</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Share: logging PHP in console for debugging]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29453#p29453" />
			<content type="html"><![CDATA[<p>I just want to share a really simple way but helpful if you are developing application in FA (or PHP in general). You can log into browser console using this library: https://github.com/ccampbell/chromephp. Put the library file in includes/ folder.</p><p>Then, just add below code in session.inc.</p><div class="codebox"><pre><code>include_once($path_to_root . &quot;/includes/ChromePhp.php&quot;);
function ConsoleDebug($obj){
    ChromePhp::log($obj);
}</code></pre></div><p>You can use it for debugging by just call ConsoleDebug($anything). It will appear in the browser console. In firefox, you don&#039;t need to install anything but in chrome you need to install extension.</p><p>For me, it is useful to debug ajax call which FA use quite a lot in many places.</p>]]></content>
			<author>
				<name><![CDATA[barbarian]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18954</uri>
			</author>
			<updated>2017-11-04T05:46:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29453#p29453</id>
		</entry>
</feed>
