DEBUG Archives | phpGrid - PHP Datagrid Create PHP grids in minutes, not hours. Wed, 23 Mar 2022 22:12:14 +0000 en-US hourly 1 CodeProjecthttps://wordpress.org/?v=7.0.3 129966043 My Favorite Browser Debug Trick https://phpgrid.com/blog/my-favorite-browser-debug-trick/ Tue, 27 Jul 2021 19:16:28 +0000 https://phpgrid.com/?p=9718

In today’s modern browsers such as Google Chrome, Firefox, Safari, and Microsoft Edge, there is a lesser-known trick that could 10 X increase your client-side debug skills for AKA javascript and CSS. In browser, to toggle Inspecting Element for a web page, here is usually how it is done: Locate page element for inspection on […]

The post My Favorite Browser Debug Trick appeared first on phpGrid - PHP Datagrid.

]]>

In today’s modern browsers such as Google Chrome, Firefox, Safari, and Microsoft Edge, there is a lesser-known trick that could 10 X increase your client-side debug skills for AKA javascript and CSS.

In browser, to toggle Inspecting Element for a web page, here is usually how it is done:

  1. Locate page element for inspection on the page,
  2. Right click the element,
  3. Click “Inspect” in context menu,
  4. Debug

It doesn’t look that bad, does it? Well, it works great, except when web developers have to do this many times a day, fatigue starts to creep in.

There’s a better way. And it takes only a single step.

It is called Keyboard Shortcut, or Hotkey.

A hot key is a key or a combination of keys on a computer keyboard that, when pressed at one time, performs a task such as starting an application. In modern software, almost all of them have some hotkey support. For example, a well-known universal hotkey for finding text on a page is Cmd + F, or Ctrl + F; Undo is Cmd + Z, or Ctrl + Z etc. 

OK, tell me already!

Here’s the hotkey to trigger the Inspect Element Mode command in the Chrome browser.

Mac Windows
Toggle Inspect Element Mode
Cmd+Shift+C Ctrl+Shift+C

Press the hotkey will toggle the Inspect Element window. Find and click on the element to inspect and start debugging.

When it comes to client-side debugging in browsers, many nifty hotkeys can be used to boost your workflow. For example, to toggle device mode here’s the keyboard shortcut:

Mac Windows
Toggle Device Mode
Cmd+Shift+M Ctrl+Shift+M

You don’t have to master all the hotkeys at once, but taking some time to get familiar with a handful of them can drastically improve your debugging experience.

Besides, you looked pretty cool for being a swift debugging ninja. 

The post My Favorite Browser Debug Trick appeared first on phpGrid - PHP Datagrid.

]]>
9718
DEBUG global constant https://phpgrid.com/documentation/debug/ Sat, 12 Oct 2013 17:51:36 +0000 http://phpgrid.com/?p=2619 Note: DEBUG global constant is only available starting version 6. For phpGrid version 5.5.5 and lower, see enable_debug() method please. phpGrid version 6 introduces a new global constant named “DEBUG” in conf.php. When set to true, it turns on the debug mode. When not defined, DEBUG value defaults to false. When DEBUG set to true: […]

The post DEBUG global constant appeared first on phpGrid - PHP Datagrid.

]]>
Note: DEBUG global constant is only available starting version 6. For phpGrid version 5.5.5 and lower, see enable_debug() method please.

phpGrid version 6 introduces a new global constant named “DEBUG” in conf.php. When set to true, it turns on the debug mode. When not defined, DEBUG value defaults to false.

When DEBUG set to true:

  • When set to true, it displays phpGrid object as well as the current PHP session information. In addition, AJAX response data are also displayed during CRUD operations. This is helpful debugging information can be used during development.
     
  • It also display the phpGrid version number and associated javascript libraries used.
1
2
// In conf.php
define('DEBUG', true);

The post DEBUG global constant appeared first on phpGrid - PHP Datagrid.

]]>
2619
enable_debug() https://phpgrid.com/documentation/enable_debug/ Tue, 14 Sep 2010 08:13:06 +0000 http://64.38.236.7/?p=355 Note: this method is going to be deprecated in the future. Please use DEBUG global constant instead. Parameter(s): $debug: boolean value indicating whether to display debug message Description: Enable debug displays phpGrid object as well as the current PHP session information. In addition, XMLHttpRequest, or AJAX, response data is displayed that occurs during CRUD operations. This is […]

The post enable_debug() appeared first on phpGrid - PHP Datagrid.

]]>
Note: this method is going to be deprecated in the future. Please use DEBUG global constant instead.

  • Parameter(s):
    • $debug: boolean value indicating whether to display debug message
  • Description:
    • Enable debug displays phpGrid object as well as the current PHP session information. In addition, XMLHttpRequest, or AJAX, response data is displayed that occurs during CRUD operations. This is helpful debugging information can be used during development.
    • It also display the phpGrid version number and associated javascript libraries used.
  • Remark:
    • Make sure this method is not called, or the $debug parameter is set to false, when deployed in production.
  • Example:
1
$dg -> enable_debug(true);

The post enable_debug() appeared first on phpGrid - PHP Datagrid.

]]>
355