{"id":16191,"date":"2014-11-30T11:03:15","date_gmt":"2014-11-30T05:33:15","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=16191"},"modified":"2014-11-30T11:05:45","modified_gmt":"2014-11-30T05:35:45","slug":"debugging-javascript-on-android-using-chrome","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/","title":{"rendered":"Debugging Javascript on Android using Chrome"},"content":{"rendered":"<p>Nowadays almost all applications that we develop are made mobile friendly and a lot of times, everything works perfectly on desktop browsers but not on mobile. Even if we know it is some javascript that is not working as expected, it becomes quite difficult to narrow down on what is causing problem.<\/p>\n<p>As we cannot check console there, I used to add alert statements to check flow and intermediate values. But using alerts is not the best way to debug stuff. <a href=\"http:\/\/stackoverflow.com\/questions\/8203473\/why-is-console-log-considered-better-than-alert\" target=\"_blank\">This link<\/a> explains it.<\/p>\n<p>Here are the steps that you can follow to get a console for your Android chrome browser.<\/p>\n<ul>\n<li>On your mobile, go to Settings -&gt; About Phone<\/li>\n<li>Tap on build number. Depending on the phone you are using you will have to tap &#8220;build number&#8221; 4 or 7 times. When you tap it once, it shows how many times you have to tap again. On Nexus its 7.<\/li>\n<li>Now go to Settings -&gt; Developer Options and turn on USB debugging.<\/li>\n<li>Connect you phone to laptop.<\/li>\n<li>Open chrome on desktop, go to\u00a0chrome:\/\/inspect\/#devices<\/li>\n<li>You will be asked for confirmation on mobile phone. Accept it<\/li>\n<li>You will see list of pages that you have opened on mobile. You can switch tabs, reload page on your mobile now using desktop browser.<\/li>\n<\/ul>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2014\/11\/inspect.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-16192 size-large\" src=\"\/blog\/wp-ttn-blog\/uploads\/2014\/11\/inspect-1024x468.png\" alt=\"inspect\" width=\"640\" height=\"292\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2014\/11\/inspect-1024x468.png 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2014\/11\/inspect-300x137.png 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2014\/11\/inspect.png 1094w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Now you can see all your console logs and check everything that was not so easy with alerts.<\/p>\n<p>Hope this helps!!!<\/p>\n<p>Vivek Sachdeva<br \/>\n@vivek_sach<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nowadays almost all applications that we develop are made mobile friendly and a lot of times, everything works perfectly on desktop browsers but not on mobile. Even if we know it is some javascript that is not working as expected, it becomes quite difficult to narrow down on what is causing problem. As we cannot [&hellip;]<\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":123,"footnotes":""},"categories":[518],"tags":[4845,796,813,1394,55],"class_list":["post-16191","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-chrome","tag-console","tag-debug","tag-javascript"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Debug javascript on android using chrome without having to use alerts\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vivek Sachdeva\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Debugging javascript on Android using chrome | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Debug javascript on android using chrome without having to use alerts\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Debugging javascript on Android using chrome | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Debug javascript on android using chrome without having to use alerts\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#article\",\"name\":\"Debugging javascript on Android using chrome | TO THE NEW Blog\",\"headline\":\"Debugging Javascript on Android using Chrome\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-sachdeva\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2014\\\/11\\\/inspect-1024x468.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#articleImage\"},\"datePublished\":\"2014-11-30T11:03:15+05:30\",\"dateModified\":\"2014-11-30T11:05:45+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#webpage\"},\"articleSection\":\"Android, Android, Chrome, console, Debug, javascript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/android\\\/#listItem\",\"name\":\"Android\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/android\\\/#listItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/android\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#listItem\",\"name\":\"Debugging Javascript on Android using Chrome\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#listItem\",\"position\":3,\"name\":\"Debugging Javascript on Android using Chrome\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/android\\\/#listItem\",\"name\":\"Android\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-sachdeva\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-sachdeva\\\/\",\"name\":\"Vivek Sachdeva\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/e4057f7b-4721-48dd-a0f9-df1b70a274c4_vivek.sachdeva@tothenew.com.jpg\",\"width\":96,\"height\":96,\"caption\":\"Vivek Sachdeva\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/\",\"name\":\"Debugging javascript on Android using chrome | TO THE NEW Blog\",\"description\":\"Debug javascript on android using chrome without having to use alerts\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/debugging-javascript-on-android-using-chrome\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-sachdeva\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek-sachdeva\\\/#author\"},\"datePublished\":\"2014-11-30T11:03:15+05:30\",\"dateModified\":\"2014-11-30T11:05:45+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Debugging javascript on Android using chrome | TO THE NEW Blog","description":"Debug javascript on android using chrome without having to use alerts","canonical_url":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#article","name":"Debugging javascript on Android using chrome | TO THE NEW Blog","headline":"Debugging Javascript on Android using Chrome","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vivek-sachdeva\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2014\/11\/inspect-1024x468.png","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#articleImage"},"datePublished":"2014-11-30T11:03:15+05:30","dateModified":"2014-11-30T11:05:45+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#webpage"},"articleSection":"Android, Android, Chrome, console, Debug, javascript"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/android\/#listItem","name":"Android"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/android\/#listItem","position":2,"name":"Android","item":"https:\/\/tothenewco.pro\/blog\/category\/android\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#listItem","name":"Debugging Javascript on Android using Chrome"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#listItem","position":3,"name":"Debugging Javascript on Android using Chrome","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/android\/#listItem","name":"Android"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/vivek-sachdeva\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/vivek-sachdeva\/","name":"Vivek Sachdeva","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/e4057f7b-4721-48dd-a0f9-df1b70a274c4_vivek.sachdeva@tothenew.com.jpg","width":96,"height":96,"caption":"Vivek Sachdeva"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/","name":"Debugging javascript on Android using chrome | TO THE NEW Blog","description":"Debug javascript on android using chrome without having to use alerts","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vivek-sachdeva\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vivek-sachdeva\/#author"},"datePublished":"2014-11-30T11:03:15+05:30","dateModified":"2014-11-30T11:05:45+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Debugging javascript on Android using chrome | TO THE NEW Blog","og:description":"Debug javascript on android using chrome without having to use alerts","og:url":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Debugging javascript on Android using chrome | TO THE NEW Blog","twitter:description":"Debug javascript on android using chrome without having to use alerts","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"16191","title":"Debugging javascript on Android using chrome | #site_title","description":"Debug javascript on android using chrome without having to use alerts","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 12:24:20","updated":"2024-02-29 08:34:23","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/android\/\" title=\"Android\">Android<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDebugging Javascript on Android using Chrome\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Android","link":"https:\/\/tothenewco.pro\/blog\/category\/android\/"},{"label":"Debugging Javascript on Android using Chrome","link":"https:\/\/tothenewco.pro\/blog\/debugging-javascript-on-android-using-chrome\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/16191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=16191"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/16191\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=16191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=16191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=16191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}