Book a Demo

Author Topic: Failed to initialize JScript Engine  (Read 11873 times)

user_368285

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Failed to initialize JScript Engine
« on: March 17, 2015, 03:35:09 am »
Hi all,
when I start a Jscript or VBScript debug, it fails with message error

Failed to initialize JScript error
or
Failed to initialize VBScript error


depending on technology I started.

I have installed Microsoft Sript Debugger,as requested, but the debug fails.


Can anyone help me?

in attach the log

[03248708]      Stack recording threshold set to 3 frames
[03248796]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[03248798]      Agent dll found: C:\Program Files (x86)\Sparx Systems\EA\vea\x86\SSScriptAgent32.DLL
[03248798]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[03248799]      Agent: Started
[03248901]      Microsoft Process Debug Manager creation Failed: 0x80040154
[03248902]      This is included as part of various Microsoft products.
[03248902]      Download the Microsoft Script Debugger to install it.
[03248902]      Failed to initialize JScript engine


Thank you

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Failed to initialize JScript Engine
« Reply #1 on: March 17, 2015, 05:46:41 pm »
Its a problem with the installation of the Microsoft Script Debugger, try re-install, other version,...

Geert

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Failed to initialize JScript Engine
« Reply #2 on: March 18, 2015, 11:13:11 am »
Did you install the Microsoft Script Debugger from the following page?
http://www.microsoft.com/en-us/download/details.aspx?id=22185

The Microsoft Process Debug Manager is typically installed as a component of various other Microsoft applications such as Visual Studio, Microsoft Office or Internet Explorer.  It is not distributed as part of Enterprise Architect, but is available as a free download from Microsoft if it is not already installed on your system.

Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Re: Failed to initialize JScript Engine
« Reply #3 on: March 18, 2015, 07:54:49 pm »
Quote
Hi all,
when I start a Jscript or VBScript debug, it fails with message error

Failed to initialize JScript error
or
Failed to initialize VBScript error


depending on technology I started.

I have installed Microsoft Sript Debugger,as requested, but the debug fails.


Can anyone help me?

in attach the log

[03248708]      Stack recording threshold set to 3 frames
[03248796]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[03248798]      Agent dll found: C:\Program Files (x86)\Sparx Systems\EA\vea\x86\SSScriptAgent32.DLL
[03248798]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[03248799]      Agent: Started
[03248901]      Microsoft Process Debug Manager creation Failed: 0x80040154
[03248902]      This is included as part of various Microsoft products.
[03248902]      Download the Microsoft Script Debugger to install it.
[03248902]      Failed to initialize JScript engine


Thank you

I advice you to not use the debug mode as sometime the program does NOT have the same behaviour in debug, and that's true for every langage. (some cmd may start at the same time in normal mode and end // or in desorder while debug mode will execute cmds one after the other and expect result at each line)

I had myself some problems, now i add a
var debug = true
if debug Session.print... else my cmd

This solution may not work for every behavior, but in most cases it helps in the analysis.
This for sure those not solve completly your problem, but it's always something that you should be aware of.

Mr.
(Don't ask me for a piece of code that does not do the same on debug and on run, not sure to have one anymore)

user_368285

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Failed to initialize JScript Engine
« Reply #4 on: March 18, 2015, 09:07:15 pm »
Quote
Did you install the Microsoft Script Debugger from the following page?
http://www.microsoft.com/en-us/download/details.aspx?id=22185

The Microsoft Process Debug Manager is typically installed as a component of various other Microsoft applications such as Visual Studio, Microsoft Office or Internet Explorer.  It is not distributed as part of Enterprise Architect, but is available as a free download from Microsoft if it is not already installed on your system.

Thank you, I solved installing from the page above.

But I not understand how to use the Jscript.

I set the breakpoint in all the function in the script JScript-CSV, then I launch the debug of it (from application bar). The debug no trace anyone breakpoint I setted.
The console output is the following

[05872445]      Stack recording threshold set to 3 frames
[05872541]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[05872541]      Agent dll found: C:\Program Files (x86)\Sparx Systems\EA\vea\x86\SSScriptAgent32.DLL
[05872542]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[05872543]      Agent: Started
[05872811]      edit and continue - unsupported
[05872858]      Script finished
[05872859]      Debug Session Ended




Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Failed to initialize JScript Engine
« Reply #5 on: March 18, 2015, 10:29:30 pm »
It might be possible that you can only set breakpoint on your own code, not on the code from local scripts.
Try it with a simple example script first.

Geert

user_368285

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Failed to initialize JScript Engine
« Reply #6 on: March 19, 2015, 12:39:22 am »
I'm not sure to understand how to use the script.
I think that the example works correctly, if I don't modify their.

Then if I open anyone script, for example the JScript-DateTime (double-click on the pop-up Scripting on the relevant file title), I see the script in the editor.
Next I play debug with the play-like button on the bar above the editor, then the result on the console is the following:

[18454179]      Stack recording threshold set to 3 frames
[18454275]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[18454277]      Agent dll found: C:\Program Files (x86)\Sparx Systems\EA\vea\x86\SSScriptAgent32.DLL
[18454277]      Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[18454282]      Agent: Started
[18454456]      edit and continue - unsupported
[18454486]      Script finished
[18454486]      Debug Session Ended


Also I set the breakpoint at the start of the functions in the script, but the debug continue without passing through this breakpoint.
 :o
There is anything that I miss?

Thank you  

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Failed to initialize JScript Engine
« Reply #7 on: March 19, 2015, 01:05:16 am »
you have to have a call to a function.
If you only have function declarations then it won't execute anything, and there isn't anything to break on.

Try with a simple one line script and see if that works, then go the more complicated stuff.

Geert

user_368285

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Failed to initialize JScript Engine
« Reply #8 on: March 19, 2015, 01:58:01 am »
Quote
you have to have a call to a function.
If you only have function declarations then it won't execute anything, and there isn't anything to break on.

Try with a simple one line script and see if that works, then go the more complicated stuff.

Geert

Big Geert!!!
I created a simple line script and this work correctly!
I doubted was as you say, there was only function declarations.  

Thank you for your suggestions!