Junior developerzy używają echo + die. To caveman debugging. Professional tools istnieją. Learn them — save tygodnie frustacji.
WP_DEBUG — enable error logging
define(’WP_DEBUG’, true); define(’WP_DEBUG_LOG’, true); define(’WP_DEBUG_DISPLAY’, false);. WordPress logs every error do wp-content/debug.log. Check log, identify issues.
Query Monitor — see performance
Plugin shows all queries, hooks, HTTP requests, performance. Right side admin bar. Click expand. Reveals bottlenecks instantly.
Xdebug — step debugging
Real debugger. Set breakpoint. Execution stops. Inspect variables. Step through code line-by-line. Invaluable dla complex issues. PhpStorm integrate Xdebug.
Chrome DevTools — frontend debugging
Network tab shows requests. Console shows JS errors. Performance tab shows bottlenecks. Many backend issues manifest w frontend slowness.