User Tools

Site Tools


debugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
debugging [2015/01/09 20:01]
shawn_a [Reporting issues in forums, or requesting assistance]
debugging [2023/11/27 18:55] (current)
Knobbles [The error log]
Line 12: Line 12:
 To turn on debugging, uncomment the GSDEBUG line in /​path/​to/​getsimple/​gsconfig.php to enable full PHP errors output to help debug in your browser. To turn on debugging, uncomment the GSDEBUG line in /​path/​to/​getsimple/​gsconfig.php to enable full PHP errors output to help debug in your browser.
  
 +===== The error log =====
 All PHP errors are also written to a log,​regardless of the GSDEBUG setting, check /​path/​to/​getsimple/​**data/​other/​logs/​errorlog.txt** All PHP errors are also written to a log,​regardless of the GSDEBUG setting, check /​path/​to/​getsimple/​**data/​other/​logs/​errorlog.txt**
 +
 +Hint: you can also write your own debug messages to the error log, just use the built-in php function **error_log("​My debug message"​)**.\\ ​
 +Do not forget to remove your error_log() commands when troubleshooting is finished, so as not to constantly fill up the error log!
  
 ===== 500 error in browser ===== ===== 500 error in browser =====
Line 55: Line 59:
  
 ===== How do I know if debug mode is enabled? ===== ===== How do I know if debug mode is enabled? =====
-http://​zegnat.net/​getsimple/​debugmode.png 
  
-When you are logged in to your admin panel it will display a small red notice in the top-right corner. 
  
 +When you are logged in to your admin panel it will display a small red notice in the top-right corner.
  
 +{{:​debug-mode.jpg?​300|}}
 ===== When should I enable debug mode? ===== ===== When should I enable debug mode? =====
 If you want to see PHP errors displayed on the website you will need to enable debug mode. This would apply to you if you are working with PHP, for instance when developing a theme or plugin . If you want to see PHP errors displayed on the website you will need to enable debug mode. This would apply to you if you are working with PHP, for instance when developing a theme or plugin .
Line 91: Line 95:
 Always post Always post
  
 +  * Version of PHP
   * Your platform, windows etc.   * Your platform, windows etc.
   * If your host is a special one, free or cloud based or lamp/wamp   * If your host is a special one, free or cloud based or lamp/wamp
debugging.1420833717.txt.gz ยท Last modified: 2015/01/09 20:01 by shawn_a