Debug as upgrade instead of new deployment to retain data?

Hi,

I am wanting to test how a user upgrade would impact their existing database with database table changes.. how can I do this using the debug on device from Monodevelop?

Every time I debug it removes all the old data from the application and starts fresh.

Cheers,
Le-roy

Posts

  • ChrisHonselaarChrisHonselaar NLBeta ✭✭✭

    Maybe someone from Xamarin will correct me, but I do not think it's possible to do this through debugging form Monodevelop/Xamarin Studio.
    Instead you should probably let Monodevelop build the .apk without running it, and then push it to the device/simulator manually using the adb -r command.
    You could use ProtoPad (sorry, self-advertising a bit here :-P) to connect to the running after the update, to 'debug' and inspect without running the Monodevelop debugger.

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Cool, thanks Jonathan! I'm using Monodevelop it was Options > Other > Mono for Android > Preserve data/cache between application deploys.

  • Jonathan - how does one do the same for iOS? TIA.

  • CheesebaronCheesebaron DKInsider, University mod

    @jeff7091 I guess that is better suited for the iOS forum, wouldn't you agree?

  • WilliamJockuschWilliamJockusch USMember ✭✭

    This has moved; it is now under Xamarin Studio > preferences > projects > android

  • BryanPoteetBryanPoteet USMember ✭✭

    What does one do if Preserve data/cache is checked and it still removes everything?

    Currently I have to set a break point just before it attaches to the database so I can copy the data back to the app folder using Root Explorer. It's getting old but I don't know what else to do. This behavior is in both VS2013 and Xamarin Studio. I'm running the latest stable version of Xamarin.

  • BryanPoteetBryanPoteet USMember ✭✭

    What does one do if Preserve data/cache is checked and it still removes everything?
    I guess resetting your phone works. I factory reset my phone and upgraded to Android 5.1.
    After the upgrade/reset the data sticks. Finally.

  • TheosTheos NLBeta ✭✭

    I resetting the phone really necessary? I've the same issue on one of my devices (OnePlus One). It's not keeping the data/cache between debug deployments, which is frustrating. On other android the data is preserved fine.
    Just would like to hear someone else to confirm I've to reset my device as I prefer not to reset it now ;)

    Thanks!

  • TheosTheos NLBeta ✭✭

    I just installed the latest CM nightly (5.1.1) and did a factory reset. Now my data/cache is preserved between new debug deployments.

    So, yes this is the solution ;)

  • BradChaseBradChase USMember

    Just wanted to say thanks! Saved me SOOOOOO much time! Our cache is quite large and it takes a very long time to load everytime I debug. Now its instant! Thank you thank you thank you!

  • ThiagoGuitarThiagoGuitar BRMember

    @Theos said:
    I resetting the phone really necessary? I've the same issue on one of my devices (OnePlus One). It's not keeping the data/cache between debug deployments, which is frustrating. On other android the data is preserved fine.
    Just would like to hear someone else to confirm I've to reset my device as I prefer not to reset it now ;)

    Thanks!

    I just clean the App Data and App Cache, then it worked!

  • BenjaminPettitBenjaminPettit USMember ✭✭

    This was broken completely on Visual Studio Community 2017 for Mac
    Version 7.3 (build 799) and Visual Studio on windows but fixed in Visual Studio Community 2017 for Mac
    Version 7.3.3 (build 12)

Sign In or Register to comment.