Development environment

CloudOnex Business Suite has built-in debug mode and an error handler. In live mode, it's disabled. When you install it in localhost, you may enable this.

To enable Dev mode- open the file system/config.php using any text editor. 

You will find a constant - define('APP_STAGE', 'Live'); which is set to Live. Change it to Dev. So it will look like this- define('APP_STAGE', 'Dev'); Now Developer mode is enabled. 

What does Dev mode do?

  • It will show detailed errors with line numbers and code snapshots when any error occurs during development.
  • It will record more logs when sending emails or other related tasks.

How to debug Javascript errors?

Open the Developer Tools-

To view javascript error messages, do the following steps after enabling dev mode-

Right-click on an empty space from Chrome or Microsoft Edge, and select Inspect. Or you can use the shortcut- Control+Shift+I or Command+Option+I on mac.

Next, click on the Console tab-

How to debug AJAX requests?

When requests are made via javascript ajax, it will not show the error message directly on the page. To view the error messages, do the following steps after opening the developer tools-

Click on the Network tab, then Click on the Fetch/XHR sub-tab. Next, make the request (e.g., submit the form) and click on the URL. You will see the error message. 

 

 

Can’t find the answers you’re looking for?

We’re here to help. Chat with us.