How do I check for cookies in Android when debugging?

I have an Ionic React app that uses the Capacitor http plugin to authenticate. Upon logging in, the app gets a session cookie from the server and a Google Analytics cookie.

I also save some values to local storage.

The app itself is working. However, sometimes I want to check the values of the cookies when debugging, and I don’t know how to do that when debugging an actual Android device.

When I’m developing on my Windows machine and debugging the PWA, I just open up Chrome Dev Tools and go to the Application tab and check the cookies there.

When I’m debugging an actual Android device connected to my computer via USB, I go to chrome://inspect/#devices and then open up my capacitor app from there. However, when I go to the Application tab in Chrome Dev Tools, no cookies are displayed, and Local Storage is shown as empty even though there are definitely cookies stored on the device because I am logged in on the app.

How can I check the values of cookies/local storage when I’m debugging on an actual Android device?

You can go to chrome://inspect/#devices in Chrome or any Chromium browser and once the page load an entry with your currently open emulator should appear.

Click on “inspect” and it will open the usual chrome devtools which you can use to check the console/network/cookies.

Thanks.

What you described is how I debug my PWA.

But, when I am debugging an Android device attached to my desktop (Windows 10) and I open up the dev tools from /inspect/devices, I don’t see the cookies or local storage on the device.

However, I know the cookies are there because I can log into my app, which requires the cookies to be stored.

It should definitely work, I would check the devtools are actually connected to the correct device.

Or, run an emulator from Android studio and check the cookies from there. With a real device there’s always the chance adb isn’t working correctly.

Hmm, I tried messing around with the ADB settings, and I managed to get the cookies to display, but not LocalStorage.

I will keep working to debug this, but thanks to your explanation, I was able to realize the problem has nothing to do with Ionic, so I’ll mark this solved.