# Are 'stored' variables destroyed each time you make an block update in the emulator (livetest)

**URL:** <https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437>\
**Category:** Questions about Thunkable X\
**Tags:** livetest\
**Created:** [December 26, 2019, 4:19pm UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437 "2019-12-26T16:19:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rem708](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rem708](https://community.thunkable.com/u/rem708)\
**Post date:** [December 26, 2019, 4:19pm UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/1 "2019-12-26T16:19:06Z")

</div>

I understand the three types of variable but wonder how stored variables are treated in the emulator (livetest).  
It would appear that each time I make even a small change to the blocks the stored data (all variables) are destroyed in the emulator.  
This is not an issue I can’t get round in test phase - just would like it confirmed and documented please

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 26, 2019, 8:06pm UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/2 "2019-12-26T20:06:26Z")

</div>

The values of stored variables are stored on the device in the workspace of the application and they should not be deleted by themselves. There may be an error in your blocks.

---

<div class="post-metadata">

**Author:** ![rem708](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rem708](https://community.thunkable.com/u/rem708)\
**Post date:** [December 26, 2019, 8:40pm UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/3 "2019-12-26T20:40:46Z")

</div>

Thanks for a prompt reply. I will check my code again.  
I have a screen which on loading looks to see if a variable is null. If it is then it opens another screen and sets a value in the variable in the process (a way of check if this is the very first time the app is run).  
In theory I should never see this path followed again but when the emulator reloads it takes me through this path as if its the first time it has run.

I will again check the logic 😉

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 27, 2019, 8:13am UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/4 "2019-12-27T08:13:54Z")

</div>

If you give a link to your example, then I can see it.

---

<div class="post-metadata">

**Author:** ![rem708](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rem708](https://community.thunkable.com/u/rem708)\
**Post date:** [January 4, 2020, 4:18pm UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/5 "2020-01-04T16:18:47Z")

</div>

Sorry or the delay. I found I was working with another app which again needed ‘stored’ variables and that works just fine.

I would just like to confirm that **stored** variables are not destroyed by the Live Test emulator each time it starts or restarts

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/are-stored-variables-destroyed-each-time-you-make-an-block-update-in-the-emulator-livetest/382437/6 "2024-11-08T11:46:08Z")

</div>


