Skip to content Skip to sidebar Skip to footer

See Stored Cookies Or Debug In Browser

I have made a webpage that stores cookies to remember what ID a user has put in a scheme viewer. It works in desktop versions of IE, Firefox and Chrome. But when I try to visit it

Solution 1:

I recommend you use the remote debugger built into the chrome for android app.

e.g.

Start adb with your phone connected via usb (usb debugging enabled) Launch chrome, goto settings, developer tools, enable remote debugging. On your pc in command prompt execute adb forward tcp:9222 localabstract:chrome_devtools_remote

Navigate to localhost:9222 from your pc for live interaction/console from your phone.

Source: https://developers.google.com/chrome-developer-tools/docs/remote-debugging

Solution 2:

well i believe that you can't quite view the cookies of the browser in android. are you sure you have cookies enabled? (menu>more>settings>accept cookies should be checked). or if you're using javascript to set the cookies, you'd wanna make sure javascript is also enabled.

to debug, all you can really do is get the cookies via PHP or javascript and print them on the webpage. if they're blank, you for sure know the cookies aren't there. if you wanna see if the javascript is being run at all, just put print a "hello world" to the page at the line above where you set the cookie. (same concepts for php, use an echo)

it's a little fishy that desktop works and not mobile. it could be the fact that mobile browsers aren't rendering the page correctly though this is probably not the case. i would try debugging first and see if your setcookie code is actually being called by with the mobile browsers

hope this helps!

Solution 3:

For Android 2.2 or 2.3 you can try this:

  1. Type about:debug in you url bar while on your page;
  2. A javascript debug bar will be opened on top of your url bar;
  3. Type in console.log(document.cookie) and hit evaluate > It should print the cookies

Bear in mind that the js debug bar on Android will only show once the web app logs something ( e.g. if a js error occurs or if you trigger it via console.log so you might want to trigger it inside your app to open)

For Android above 2.3 you have more debug options ;)

EDITED:

As per Zeb's answer check here: https://developers.google.com/chrome-developer-tools/docs/remote-debugging

Post a Comment for "See Stored Cookies Or Debug In Browser"