I am using ionic-storage and am having some issues with debugging. I would like to be able to view the contents of storage, but using the chrome debugger it seems like nothing shows up:
Also if I set a break point in one of my components that uses storage and try to output values (or everything using forEach) like so: this.storage.get('key').then(value=>console.log(value)), it doesn’t output anything. I’m a bit lost as to how I can check to see that certain values are being set correctly without hard coding the above into my application… This is not ideal.
I wouldn’t worry about that. It’s a completely different animal from IonicDB, which was a hosted service. The ionic-storage source code is fully available, and anybody could fork it. It’s largely a veneer over localforage.
My app does sucesfully store content. When I use this.storage.forEach() to output every key, value pair I see my data. I just doesn’t appear in the debugger. Are you using the default set up or do you have some sort of configuration specified?
Experiencing the same thing here. Nothing shows up in the inspector, yet all the key/values are being stored somewhere. Using all defaults for Ionic Storage. Any idea where everything is getting stored?
Yes I have the ‘cordova-sqlite-storage’ plugin installed as well. Storage seems to be working with no issues, my only problem is that I cannot easily view the contents of storage for debugging.
Yesterday i was facing same issue. But today when I run ionic serve stored data appeared. Dont know exactly what the issue is. Stop ionic serve and run it again it will appear in indexedDB in chrome.
Well, If someone is having this problem yet, I solved mine just inputting a parameter in config of StorageConfig, where I was using the storage, like this:
function provideStorage7() {
return new Storage({
name:'dbSomething',
driverOrder: ['indexeddb', 'sqlite', 'websql'], /* added this line */
storeName:'table_one'
})
}