How can I detect what is happening to a program?

  • Thread starter Thread starter jmDesktop
  • Start date Start date
J

jmDesktop

Not sure where to post this, but I have a vbscript that is dying and
I
do not know why. It runs for a while then disappears (dies.) I know
that vbscript has no decent error handling, but that I can do if
err.number >0 ...., It isn't a problem with the script, however, and
I
believe it is dying because of something outside of it - in the OS or
some other conflict.

Is there any way to build a .NET or something else program that
monitors and logs why
the program dies and not just that it died? I'm not sure how to
proceed.


Thanks for any help.

Sorry. I posted this in the wrong ms forum before.
 
jmDesktop said:
Not sure where to post this, but I have a vbscript that is dying and
I
do not know why. It runs for a while then disappears (dies.) I know
that vbscript has no decent error handling, but that I can do if
err.number >0 ...., It isn't a problem with the script, however, and
I
believe it is dying because of something outside of it - in the OS or
some other conflict.

Is there any way to build a .NET or something else program that
monitors and logs why
the program dies and not just that it died? I'm not sure how to
proceed.


Thanks for any help.

Sorry. I posted this in the wrong ms forum before.

If the script is VBScript and has "On Error Resume Next", then remove that
statement. It suppresses all error reporting. Hopefully when you run the
script you will then get an error message. The error messages include a line
number, which helps a great deal.

If it takes awhile for the script to timeout it often is trying to bind to
or access some remote object that it cannot find. Otherwise, it is possible
for code to get caught in an infinite loop, but if so it never "dies", you
need to halt the process.

You may need to post at least some of the code to get more help. If you get
an error, post the message and the relevant code (including the line that
raises the error).
 
jmDesktop said:
Not sure where to post this,

You might try (reasonable crossposting to) the VBScript group(s).

but I have a vbscript that is dying and
I
do not know why. It runs for a while then disappears (dies.) I know
that vbscript has no decent error handling, but that I can do if
err.number >0 ...., It isn't a problem with the script, however, and
I
believe it is dying because of something outside of it - in the OS or
some other conflict.

Why do you believe that?

You can put print or echo statements into any script, send the output
to a file (maybe with flushing to ensure writes complete), then see
where it gets to.

You could also record the times to see if this is TIME dependent.

By default for instance, Logon/Startup(etc) scripts only get 10
minutes MAX.
 
Back
Top