Ext*_*kun 9 php debugging wordpress wordpress-plugin
我正在为WordPress编写一些插件和主题,我觉得很难调试,因为在页面加载时,$ _GET,$ _POST和$ _REQUEST都是空的.即使设置了错误报告,每当出现致命错误时,我都不会收到空白页以外的错误消息.反正为WordPress启用'调试模式'吗?
谢谢!
mar*_*dge 11
梨调试Wordpress插件:http://wordpress.org/extend/plugins/wp-pear-debug/
2015年4月4日更新:上述插件在几年内未更新.您还可以使用内置的WordPress PHP调试功能wp-config.php,即:
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);
Run Code Online (Sandbox Code Playgroud)
有关完整的文档,请参阅https://codex.wordpress.org/Debugging_in_WordPress
| 归档时间: |
|
| 查看次数: |
6370 次 |
| 最近记录: |