{"id":142,"date":"2023-02-14T00:00:00","date_gmt":"2023-02-13T23:00:00","guid":{"rendered":"https:\/\/helloblog.io\/de\/besseres-wordpress-debugging-mit-acorn\/"},"modified":"2026-01-20T06:32:39","modified_gmt":"2026-01-20T05:32:39","slug":"besseres-wordpress-debugging-mit-acorn","status":"publish","type":"post","link":"https:\/\/helloblog.io\/de\/besseres-wordpress-debugging-mit-acorn\/","title":{"rendered":"Besseres WordPress-Debugging mit Acorn: WP_DEBUG endlich sinnvoll lesen"},"content":{"rendered":"\n<p>In WordPress ist <code>WP_DEBUG<\/code> der klassische Schalter, um Notices, Warnings und Exceptions in der Entwicklung sichtbar zu machen. Aktiviert man ihn konsequent lokal, f\u00e4ngt man viele Probleme fr\u00fch ab \u2013 gerade weil im WordPress-\u00d6kosystem (Themes, Plugins, MU-Plugins) erstaunlich oft \u201ekleine\u201c Notices entstehen, die sp\u00e4ter im falschen Moment zu echten Bugs werden.<\/p>\n\n\n\n<p>Das Problem: Die Standardausgabe von WordPress ist funktional, aber unbequem. Sie wirft Meldungen einfach ins HTML, ohne Kontext, ohne Stacktrace-Darstellung, ohne gute Lesbarkeit. Genau hier setzt <strong>Acorn<\/strong> an: Es erweitert die Ausgabe von <code>WP_DEBUG<\/code> so, dass du Fehler \u00e4hnlich angenehm analysieren kannst wie in modernen PHP-Frameworks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WP_DEBUG in WordPress: Was passiert standardm\u00e4\u00dfig?<\/h2>\n\n\n\n<p>Wenn <code>WP_DEBUG<\/code> aktiv ist, schreibt WordPress Fehlermeldungen und PHP-Notices je nach Konfiguration direkt ins Markup (und\/oder in Logs). F\u00fcr schnelle Sichtbarkeit ist das okay \u2013 aber beim echten Debugging fehlt oft das, was du brauchst: klare Exception-Seiten, konsistente Stacktraces, saubere Darstellung von Request- und Kontextinfos.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"2252\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-scaled.png\" alt=\"Standardausgabe von WP_DEBUG in WordPress mit direkt im HTML gerenderten Fehlermeldungen\" class=\"wp-image-138\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-300x264.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-1024x901.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-768x676.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-1536x1351.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-2048x1802.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-default-400x352.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">So sieht WP_DEBUG ohne zus\u00e4tzliche Tools h\u00e4ufig aus: Meldungen landen direkt auf der Seite. \u2014 <em>Forr\u00e1s: Roots.io<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Bedrock-Setup: WP_DEBUG ist in Development oft schon gesetzt<\/h2>\n\n\n\n<p>Wenn du mit <strong>Bedrock<\/strong> arbeitest (modernes WordPress-Boilerplate mit Composer), ist <code>WP_DEBUG<\/code> in Development-Umgebungen typischerweise bereits aktiviert. Das nimmt dir eine Fehlerquelle ab: Du startest nicht aus Versehen \u201eblind\u201c in eine lokale Session, sondern siehst Notices und Errors sofort.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Acorn als Upgrade f\u00fcr WP_DEBUG-Ausgaben<\/h2>\n\n\n\n<p><strong>Acorn<\/strong> ist das Roots-Paket, das Laravel-Komponenten in WordPress-Projekte bringt (u. a. Service Container, Commands, Helpers). F\u00fcrs Debugging besonders interessant: Wenn <code>WP_DEBUG<\/code> <strong>und<\/strong> <code>WP_DEBUG_DISPLAY<\/code> aktiv sind, ersetzt Acorn die eher rohe WordPress-Ausgabe durch deutlich besser lesbare Error-Handling-Seiten.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Acorns Default: Symfony Exception Handler<\/h3>\n\n\n\n<p>Ohne weitere Zusatzpakete nutzt Acorn standardm\u00e4\u00dfig den <strong>Symfony Exception Handler<\/strong>. Das liefert dir eine strukturierte Exception-Ansicht, bei der du schneller erkennst, wo der Fehler ausgel\u00f6st wurde und welche Pfade beteiligt sind.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"2252\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-scaled.png\" alt=\"Acorn nutzt standardm\u00e4\u00dfig eine Symfony-Exception-Page f\u00fcr WP_DEBUG\" class=\"wp-image-139\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-300x264.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-1024x901.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-768x676.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-1536x1351.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-2048x1802.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-symfony-400x352.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Acorns Standard-Error-Page (Symfony) ist deutlich lesbarer als die WordPress-Ausgabe. \u2014 <em>Forr\u00e1s: Roots.io<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Ignition in WordPress: Laravel-Feeling dank Acorn v3<\/h3>\n\n\n\n<p>Wenn du aus der Laravel-Welt kommst, kennst du vermutlich <strong>Ignition<\/strong>: die Error-Page, die seit Laravel v9 der Standard ist. Mit <strong>Acorn v3<\/strong> ist Ignition auch in WordPress-Projekten nutzbar, weil Acorn seit v3 Laravel-Routing unterst\u00fctzt \u2013 und damit auch das Ignition-Integration-Setup m\u00f6glich wird.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"2252\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-scaled.png\" alt=\"WP_DEBUG-Ausgabe in WordPress mit Acorn und Ignition im Laravel-Stil\" class=\"wp-image-140\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-300x264.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-1024x901.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-768x676.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-1536x1351.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-2048x1802.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-ignition-400x352.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Mit Ignition bekommst du die vertraute Laravel-Debug-Experience direkt in WordPress. \u2014 <em>Forr\u00e1s: Roots.io<\/em><\/figcaption><\/figure>\n\n\n\n<p>F\u00fcr Ignition installierst du das Paket in der Regel als Dev-Dependency \u00fcber Composer (im gleichen Verzeichnis, in dem Acorn installiert ist):<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer require spatie\/laravel-ignition --dev\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> spatie\/laravel-ignition<\/span><span style=\"color:#79B8FF\"> --dev<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-group callout callout-info is-style-info is-layout-flow wp-block-group-is-layout-flow\" style=\"border-width:1px;border-radius:8px;padding-top:1rem;padding-right:1.5rem;padding-bottom:1rem;padding-left:1.5rem\">\n\n<h4 class=\"wp-block-heading callout-title\">Hinweis zu WP_DEBUG_DISPLAY<\/h4>\n\n\n<p>Acorn verbessert die Bildschirm-Ausgabe, wenn <code>WP_DEBUG<\/code> und <code>WP_DEBUG_DISPLAY<\/code> aktiv sind. In Staging\/Production willst du Fehler in der Regel nicht im Frontend ausgeben \u2013 dort geh\u00f6ren sie in Logs und Monitoring.<\/p>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Whoops: die fr\u00fchere Empfehlung (v. a. f\u00fcr Acorn v2)<\/h3>\n\n\n\n<p>Vor Acorn v3 war <strong>whoops<\/strong> (filp\/whoops) eine verbreitete Empfehlung, um bessere Error-Pages zu bekommen. Wenn du noch auf Acorn v2 bist, kann whoops die DX sp\u00fcrbar verbessern. Langfristig ist ein Upgrade auf Acorn v3 naheliegend, wenn du die modernere Integration (inkl. Ignition) nutzen willst.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"2252\" src=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-scaled.png\" alt=\"WP_DEBUG-Ausgabe in WordPress mit Acorn und whoops\" class=\"wp-image-141\" srcset=\"https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-scaled.png 2560w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-300x264.png 300w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-1024x901.png 1024w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-768x676.png 768w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-1536x1351.png 1536w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-2048x1802.png 2048w, https:\/\/helloblog.io\/app\/uploads\/sites\/3\/2026\/01\/wp_debug-acorn-whoops-400x352.png 400w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption class=\"wp-element-caption\">Whoops liefert ebenfalls eine deutlich bessere Fehlerseite als der WordPress-Default. \u2014 <em>Forr\u00e1s: Roots.io<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Ohne Acorn: sinnvolle Debug-Alternativen als Plugins<\/h2>\n\n\n\n<p>Nicht jedes Projekt l\u00e4uft mit Acorn \u2013 und manchmal willst du in einem bestehenden Setup nur gezielt observability nachr\u00fcsten. F\u00fcr eine bessere Debug-Erfahrung rund um <code>WP_DEBUG<\/code> und Performance-Analysen sind diese Plugins besonders g\u00e4ngig:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><a href=\"https:\/\/querymonitor.com\/\">Query Monitor<\/a> \u2013 f\u00fcr viele lokale Setups quasi Pflicht: DB-Queries, Hooks, HTTP-Calls, PHP-Errors, REST-Requests und mehr.<\/li>\n\n\n<li><a href=\"https:\/\/wordpress.org\/plugins\/debug-bar\/\">Debug Bar<\/a> \u2013 klassische Debug-Leiste mit technischen Infos, gut als leichtgewichtiger Einstieg.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Kurzfazit: Was bringt dir Acorn beim Debugging konkret?<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Du beh\u00e4ltst <code>WP_DEBUG<\/code> als WordPress-Mechanik, bekommst aber eine deutlich bessere Darstellung von Exceptions.<\/li>\n\n\n<li>Mit Acorn v3 kannst du Ignition nutzen und erh\u00e4ltst eine Debug-Experience, die viele aus Laravel kennen.<\/li>\n\n\n<li>Auch ohne Ignition liefert Acorn (Symfony Handler) eine sp\u00fcrbar aufger\u00e4umtere Fehleranalyse als die Standardausgabe.<\/li>\n\n\n<li>F\u00fcr Projekte ohne Acorn bleiben Query Monitor und Debug Bar solide Werkzeuge, um Probleme schneller einzugrenzen.<\/li>\n\n<\/ol>\n\n\n<div class=\"references-section\">\n                <h2>Referenzen \/ Quellen<\/h2>\n                <ul class=\"references-list\"><li><a href=\"https:\/\/roots.io\/better-wordpress-debugging-with-acorn\/\" target=\"_blank\" rel=\"noopener noreferrer\">Better WordPress Debugging with Acorn<\/a><\/li><li><a href=\"https:\/\/roots.io\/bedrock\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bedrock<\/a><\/li><li><a href=\"https:\/\/github.com\/filp\/whoops\" target=\"_blank\" rel=\"noopener noreferrer\">whoops<\/a><\/li><li><a href=\"https:\/\/querymonitor.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Query Monitor<\/a><\/li><li><a href=\"https:\/\/wordpress.org\/plugins\/debug-bar\/\" target=\"_blank\" rel=\"noopener noreferrer\">Debug Bar<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>WP_DEBUG ist Pflicht in der lokalen Entwicklung \u2013 aber die Standardausgabe ist kaum hilfreich. Mit Acorn bekommst du Exception-Pages, die du aus dem Laravel-\u00d6kosystem kennst, inklusive Ignition-Support.<\/p>\n","protected":false},"author":10,"featured_media":137,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[3,65,8,72,10],"class_list":["post-142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-okosystem","tag-acorn","tag-bedrock","tag-composer","tag-debugging","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":1,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/posts\/142\/revisions\/156"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/media\/137"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/de\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}