{"id":1242,"date":"2023-07-26T05:00:00","date_gmt":"2023-07-26T12:00:00","guid":{"rendered":"https:\/\/www.angulartraining.com\/daily-newsletter\/?p=1242"},"modified":"2023-07-25T14:47:04","modified_gmt":"2023-07-25T21:47:04","slug":"browser-dev-tools-for-localstorage","status":"publish","type":"post","link":"https:\/\/www.angulartraining.com\/daily-newsletter\/browser-dev-tools-for-localstorage\/","title":{"rendered":"Browser dev tools for LocalStorage"},"content":{"rendered":"\n<p>Last week, I introduced <a href=\"https:\/\/www.angulartraining.com\/daily-newsletter\/localstorage-and-sessionstorage\/\" target=\"_blank\" rel=\"noopener\" title=\"\"><code>localStorage<\/code> and <code>sessionStorage<\/code><\/a>. I also suggested a<a href=\"https:\/\/www.angulartraining.com\/daily-newsletter\/notifications-from-localstorage-with-signals\/\" target=\"_blank\" rel=\"noopener\" title=\"\"> few options to get notifications when such storage<\/a> gets updated.<\/p>\n\n\n\n<p>Today, I will cover how we can visualize and debug storage data. In Google Chrome, open the dev tools (right-click on the webpage, then &#8220;inspect&#8221; or press <code>Ctrl + Shift + I<\/code>).<\/p>\n\n\n\n<p>Once the dev tools panel shows up, click on the &#8220;Application&#8221; tab:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"418\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-36.png\" alt=\"\" class=\"wp-image-1243\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-36.png 882w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-36-300x142.png 300w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-36-768x364.png 768w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>You can select Local Storage or Session Storage on the left-hand side. This shows you the contents of those storages on the right-hand side in key-value pairs. Storage is by domain, so using those tools on a different website would show you different data.<\/p>\n\n\n\n<p>If an object is stored as a JSON string, you can click on the key-value row, and Chrome shows a collapsible version of that Javascript object at the bottom of the screen, making it easy to explore complex objects:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"249\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-37.png\" alt=\"\" class=\"wp-image-1244\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-37.png 682w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-37-300x110.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>There are two buttons in the top right corner of that same panel. One allows you to clear the entire storage for the current domain, while the second one (the X) clears the currently selected key-value pair:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"120\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-38.png\" alt=\"\" class=\"wp-image-1245\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-38.png 309w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/07\/image-38-300x117.png 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>You can edit a key or value by double-clicking on the corresponding cell in the right panel&#8217;s table. This makes testing different values, resetting a cache, or debugging specific scenarios easy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, I introduced localStorage and sessionStorage. I also suggested a few options to get notifications when such storage gets updated. Today, I will cover how we can visualize and debug storage data. In Google Chrome, open the dev tools (right-click on the webpage, then &#8220;inspect&#8221; or press Ctrl + Shift + I). Once the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,17],"tags":[],"class_list":["post-1242","post","type-post","status-publish","format-standard","hentry","category-debugging","category-tools"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/comments?post=1242"}],"version-history":[{"count":2,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1242\/revisions"}],"predecessor-version":[{"id":1247,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/1242\/revisions\/1247"}],"wp:attachment":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/media?parent=1242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/categories?post=1242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/tags?post=1242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}