{"id":8454,"date":"2024-04-23T10:29:36","date_gmt":"2024-04-23T09:29:36","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=8454"},"modified":"2024-04-23T10:30:38","modified_gmt":"2024-04-23T09:30:38","slug":"javascript-typescript-debug-options","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/javascript-typescript-debug-options\/","title":{"rendered":"Javascript \/ typescript debug options"},"content":{"rendered":"\n<p>Source: <a href=\"https:\/\/raygun.com\/learn\/javascript-debugging-tips\">https:\/\/raygun.com\/learn\/javascript-debugging-tips<\/a><\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"javascript\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">if (yourCondition) {    \n    debugger; \/\/ This statement pauses the debugger while devtools is open\n}\n\ndebug(car.funcY) \/\/ Type this in the console and the script will stop in debug mode when it gets a function call to car.funcY\n\nmonitor(funcY) \/\/ Type this in the console to output function calls and arguments\n\n\/\/ To time a function\nconsole.time('Timer1');\nvar items = [];\nfor(var i = 0; i &lt; 100000; i++){\n   items.push({index: i});\n}\nconsole.timeEnd('Timer1');<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"249\" src=\"https:\/\/solidt.eu\/site\/wp-content\/uploads\/2024\/04\/image-2.png\" alt=\"\" class=\"wp-image-8455\" srcset=\"https:\/\/solidt.eu\/site\/wp-content\/uploads\/2024\/04\/image-2.png 808w, https:\/\/solidt.eu\/site\/wp-content\/uploads\/2024\/04\/image-2-300x92.png 300w, https:\/\/solidt.eu\/site\/wp-content\/uploads\/2024\/04\/image-2-768x237.png 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/raygun.com\/learn\/javascript-debugging-tips<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8454","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=8454"}],"version-history":[{"count":2,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8454\/revisions"}],"predecessor-version":[{"id":8457,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/8454\/revisions\/8457"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=8454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=8454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=8454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}