Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paulus on February 22, 2013, 09:12:33 am

Title: Unable to debug VBSript?
Post by: Paulus on February 22, 2013, 09:12:33 am
Hi All,

I tried using the new debugging feature in EA 10 on a plain vbscript (just system.output ¨xxx¨ in main) but the debugger won´t run.

The debug view displays the following trace:

[00036158]      Stack recording threshold set to 3 frames
[00036219]      Default Directory is C:\Documents and Settings\paulus\Bureaublad
[00036220]      Agent dll found: C:\Program Files\Sparx Systems\EA\VEA\SSScriptAgent.dll
[00036220]      Default Directory is C:\Documents and Settings\paulus\Bureaublad
[00036221]      Agent: Started
[00036248]      Failed to initialize Javascript engine

Anybody come across this?

I should note that -running- the vbscript works just fine and also debugging in -Javascript- works fine. It´s just debugging vbscript (and Jsript btw) that don´t seem to work.

regards,

Paulus
Title: Re: Unable to debug VBSript?
Post by: qwerty on February 22, 2013, 11:03:29 am
I get the same error. Even with the most primitive hello-world example. However, I'm quite sure I've had this seen working before. I'm on he latest build, so probably they introduced a bug here.

q.
Title: Re: Unable to debug VBSript?
Post by: RoyC on February 22, 2013, 11:10:01 am
I don't know very much about Script debugging, but perhaps one or both of the following points have some relevance?

VBScript and JScript require the Microsoft Process Debug Manager to be installed on the local machine; this can be downloaded from Microsoft - do you have this?

The last line of your trace reads: Failed to initialize Javascript engine. If you are debugging VBScript or JScript, the engine wouldn't be Javascript, would it? Looks like it is not looking for the right engine.

EDIT: I believe, though, that this has been logged as a bug and is under investigation.
Title: Re: Unable to debug VBSript?
Post by: Paulus on February 22, 2013, 09:04:48 pm
I did file this as a bug and it is indeed currently under investigation but i was hoping someone already had solved this in the communitiy. Since i have this problem on two platforms (XP en 7) it seems like something that others must have run into before.

Once the issue has been solved i'll post the solution here for future reference.

@qwerty yes i have also seen this working, in a youtube demo from Sparx. I'm also on the latest build so i'll try to install a previous version and see how that works.

@Roy regarding the last line in the trace => i noticed that too but i also found a config file 'debug-config.ini' containing entries that suggests to me that SSScriptAgent.DLL  is used for debugging all three scripting languages (so i dismissed this last line as an 'error in the error report').
Title: Re: Unable to debug VBSript?
Post by: qwerty on February 22, 2013, 11:39:47 pm
Quote
@qwerty yes i have also seen this working, in a youtube demo from Sparx. I'm also on the latest build so i'll try to install a previous version and see how that works.
I was invited for a webcast (dated 30.1.2013) where Sparx showed this feature and right after that I tried it. So it did work beginning of February. That time I was on a pre-1006 release (I guess 1004) and I upgraded a bit later than the time where 1006 appeared (31.1.2013).

q.
Title: Re: Unable to debug VBSript?
Post by: jni on February 28, 2013, 09:13:57 pm
I am having this problem with javascript/JScript. Basic code works, but as soon as I tried to do something with an ActiveXObject (in this case calling the EAScripts library functions for reading XML) it tells me it cant create the object and the debugger complains about failing to initialize javascript.

I've tried updating to build 1006 this morning and no improvement.

Running Windows 7, so the advice from support (to re-install Windows Scripting) doesn't help as Script 5.8 isn't available as a standalone download.

I installed the Visual Studio plugin to see if that helps, although I dont have VS itself installed. Grasping at straws.  :-/

\N

Title: Re: Unable to debug VBSript?
Post by: qwerty on March 01, 2013, 12:40:44 am
If you read my previous post you should know that in this case downgrading would be the better idea  :-X

q.
Title: Re: Unable to debug VBSript?
Post by: jni on March 01, 2013, 05:59:40 am
I've tried downgrading to 9.3. I get a slightly different message but the outcome is the same.

EAScriptLib.JScript-XML ActiveXObject is not defined

\N
Title: Re: Unable to debug VBSript?
Post by: qwerty on March 01, 2013, 07:22:57 am
9.3? That did not offer debugging. You will need 1003 or the like...

q.
Title: Re: Unable to debug VBSript?
Post by: Aaron B on March 01, 2013, 09:32:46 am
Also note that JScript and Javascript are two entirely different scripting engines.  AFAIK - ActiveXObject is only accessible from JScript, not Javascript.

Please confirm that your script is JScript, not Javascript.
Title: Re: Unable to debug VBSript?
Post by: Paulus on April 09, 2013, 09:00:37 pm
With respect to the original message in this post: the problem of not being able to debug vbscript has finally been solved with the help of the additional log info added to revision 1007.

Turned out that a required microsoft component was missing.

Here's the reply from Sparx:

Quote
Try downloading and installing the Microsoft Script Debugger from the following page:
http://www.microsoft.com/en-us/download/details.aspx?id=22185

After installing this i was able to debug vbscript, in revision 1007 and also in revision 1006.
Title: Re: Unable to debug VBSript?
Post by: qwerty on April 09, 2013, 09:42:12 pm
Does not work for me. After having installed it, EA behaves different. But the result is simply: SSProfiler75.exe has encountered a problem and needs to close.  We are sorry for the inconvenience.

Thank you, Microsoft.

q.
Title: Re: Unable to debug VBSript?
Post by: Paulus on April 09, 2013, 10:37:11 pm
Sorry to hear it didn't work in your case.

Quote
Thank you, Microsoft.

I know the feeling... apart from EA i toyed a bit with a third-party debugger that claims to be able to hook into running scripts (8-)) but (for now) gave up on that. Debugging with the PDM is a murky business and it shouldn't be.

Still be sure to check the debugger view for the additional logging added in 1007, maybe that provides some pointers,

best regards,

Paulus


Title: Re: Unable to debug VBSript?
Post by: qwerty on April 10, 2013, 06:39:16 am
Quote
in revision 1007
Where did you get that from? I got an announcement that one of my reported bugs would be fixed in 1007. But the official site still is at 1006.

q.
Title: Re: Unable to debug VBSript?
Post by: KP on April 10, 2013, 02:27:38 pm
Quote
Where did you get that from? I got an announcement that one of my reported bugs would be fixed in 1007. But the official site still is at 1006.
1007 went out on Monday but it appears the front page of the website wasn't updated. I have let the web team know.

If you want to make sure you never miss a release, go to the Latest News board of the forum and click the "Notifications" button and you can request an e-mail notifying you whenever a news item gets posted to that forum.
Title: Re: Unable to debug VBSript?
Post by: qwerty on April 10, 2013, 06:53:15 pm
I have now downloaded 1007 (the page still tells it would be 1006 but it's actually 1007). Same new error.

q.
Title: Re: Unable to debug VBSript?
Post by: Paulus on April 11, 2013, 03:31:53 am
Quote
Does not work for me. After having installed it, EA behaves different. But the result is simply: SSProfiler75.exe has encountered a problem and needs to close.  We are sorry for the inconvenience.

I get this same error, on XP, but only if i don't set a breakpoint (so the script runs without stopping). Maybe that is also the case in your situation?

Btw windows 8 also produces a (different) error in that situation.

best regards,

Paulus

Title: Re: Unable to debug VBSript?
Post by: qwerty on April 11, 2013, 10:25:07 am
True. if I set a breakpoint it lets me debug. Holy crap! There are quite a number of reasons to loathe Apple. But that's nothing against Mickeysoft.

q.