Saving the state of a javascript virtual machine

  • Thread starter Daniele (Dan) Mazzini
  • Start date
D

Daniele (Dan) Mazzini

Hello everybody

I was wondering if there was any js virtual machine out there which
supports saving its current state to disk, so that you could resume
that same state at a later time (smalltalk implementations for example
have this feature, they call it saving an image). It could be very
useful for debugging and other situations.

I did some search on the internet but didn't find anything about this
topic... does anybody know more?

Thanks

Dan
 
D

Dr J R Stockton

In comp.lang.javascript message <ded96d65-bc97-4d7f-890c-decad6f108c5@k8
g2000yqn.googlegroups.com>, Sat, 6 Jun 2009 15:14:31, "Daniele (Dan)
Mazzini said:
I was wondering if there was any js virtual machine out there which
supports saving its current state to disk, so that you could resume
that same state at a later time (smalltalk implementations for example
have this feature, they call it saving an image). It could be very
useful for debugging and other situations.

If there is, it would be so useful that it should have been included in
the FAQ.

For some applications, it would be possible to have each cycle of a
moderately-inner loop initiated by a short timeout, which should enable
a changed checkbox to be read before after the timeout (my js-tourn.htm
(and/or js-pairs.htm) does similar, to enable continual display update
in IE4).

Then, if the checkbox was checked, the application could write all its
state variables to a textarea, for copy'n'paste to save on disc. On
start-up it would read the textarea to [re-]initialise itself
appropriately. UNTESTED.

Also, perhaps the application can be run in Windows Script Host, when it
has access to the disc and can automate the essence of that. Or it
could perhaps be run as an HTA.

Debugging limited to the Microsoft Script Engine cannot find everything;
but getting an application working in IE is a good start if the problems
are substantially with the algorithm rather than with linguistic
subtleties.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top