{"id":2233,"date":"2022-01-28T13:19:52","date_gmt":"2022-01-28T12:19:52","guid":{"rendered":"https:\/\/ekiwi.de\/?p=2233"},"modified":"2022-01-28T13:19:52","modified_gmt":"2022-01-28T12:19:52","slug":"jetbrains-webstorm-react-js-anwendung-debuggen","status":"publish","type":"post","link":"https:\/\/ekiwi.de\/index.php\/2233\/jetbrains-webstorm-react-js-anwendung-debuggen\/","title":{"rendered":"JetBrains WebStorm &#8211; React JS Anwendung debuggen"},"content":{"rendered":"<p>JavaScript React Anwendung in WebStorm debuggen und Breakpoints setzen.<\/p>\n<p><!--more--><\/p>\n<p>Ich hatte ein paar Probleme eine React-Anwendung in WebStorm zu debuggen. Im Grunde genommen ist es recht einfach, wenn man wei\u00df, wie es geht.<\/p>\n<p>Der Schl\u00fcssel liegt darin, dass wir zwei Run-Konfigurationen ben\u00f6tigen. Eine f\u00fcr den &#8222;npm&#8220; Teil, welcher den Node.js Webserver startet und dann noch eine Konfiguration f\u00fcr das Debugging mit Chrome.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_1.png\" alt=\"\" width=\"253\" height=\"142\" class=\"alignnone size-full wp-image-2234\" \/><\/p>\n<p>Zuerst legen wir die &#8222;npm&#8220; Konfiguration an.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_2.png\" alt=\"\" width=\"1046\" height=\"676\" class=\"alignnone size-full wp-image-2235\" srcset=\"\/wp-content\/uploads\/2022\/01\/debug_2.png 1046w, \/wp-content\/uploads\/2022\/01\/debug_2-300x194.png 300w, \/wp-content\/uploads\/2022\/01\/debug_2-1024x662.png 1024w, \/wp-content\/uploads\/2022\/01\/debug_2-768x496.png 768w\" sizes=\"auto, (max-width: 1046px) 100vw, 1046px\" \/><\/p>\n<p>Anschlie\u00dfend die Konfiguration f\u00fcr das Java-Script-Debugging:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_3.png\" alt=\"\" width=\"1046\" height=\"676\" class=\"alignnone size-full wp-image-2236\" srcset=\"\/wp-content\/uploads\/2022\/01\/debug_3.png 1046w, \/wp-content\/uploads\/2022\/01\/debug_3-300x194.png 300w, \/wp-content\/uploads\/2022\/01\/debug_3-1024x662.png 1024w, \/wp-content\/uploads\/2022\/01\/debug_3-768x496.png 768w\" sizes=\"auto, (max-width: 1046px) 100vw, 1046px\" \/><\/p>\n<p>Anschlie\u00dfend starten wir zuerst die &#8222;npm&#8220; Konfiguration. Diese kann im Hintergrund einfach laufen, damit sich diese bei \u00c4nderungen automatisch aktualisiert.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_4.png\" alt=\"\" width=\"294\" height=\"101\" class=\"alignnone size-full wp-image-2237\" \/><\/p>\n<p>Danach k\u00f6nnen wir das Debugging im Browser starten.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_5.png\" alt=\"\" width=\"352\" height=\"105\" class=\"alignnone size-full wp-image-2238\" srcset=\"\/wp-content\/uploads\/2022\/01\/debug_5.png 352w, \/wp-content\/uploads\/2022\/01\/debug_5-300x89.png 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/p>\n<p>Fertig! Wir k\u00f6nnen nun Breakpoints setzen und unsere Webanwendung in der DIE debuggen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/01\/debug_6.png\" alt=\"\" width=\"751\" height=\"174\" class=\"alignnone size-full wp-image-2239\" srcset=\"\/wp-content\/uploads\/2022\/01\/debug_6.png 751w, \/wp-content\/uploads\/2022\/01\/debug_6-300x70.png 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>JavaScript React Anwendung in WebStorm debuggen und Breakpoints setzen.<\/p>\n","protected":false},"author":1,"featured_media":217,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[15],"tags":[44,562,561,563],"class_list":["post-2233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-javascript","tag-js","tag-react","tag-webstorm"],"_links":{"self":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/comments?post=2233"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2233\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media\/217"}],"wp:attachment":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media?parent=2233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/categories?post=2233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/tags?post=2233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}