Debugging Mode Error

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 17 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Presumpscott
Posts: 5
Last visit: Fri Aug 09, 2013 1:51 pm

Debugging Mode Error

Post by Presumpscott »

Hello Support Team,

Now that I have debugging installed on the Windows 2003 server I am seeing odd behavior inside of PrimalScript Enterprise 4.0.5. I am stepping through code that works just fine but when I hit some lines it abends and PSE spits out an error "C:TESTrunfolderstrdomaintest.vbs(26): Exception: Unknown Exception"

If I run the code straight there is no PSE error. If I set a breakpoint below this point and run the code it works fine.

Why is PSE not correctly processing the vbscript code in debugging mode?
User avatar
Presumpscott
Posts: 5
Last visit: Fri Aug 09, 2013 1:51 pm

Debugging Mode Error

Post by Presumpscott »

Here is the initial code block:

strComputer = "."
' Inspect system Domain Role should be greater than 3 for production so that code only runs on designated domain controllersSet objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!" & strComputer & "rootcimv2")'Determine system domain role block this code from collecting any account information on workstations or Domain ControllersSet colComputers = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")For Each objComputer In colComputers'WScript.Echo "strComputer Domain: " & objComputer.domainstrTemp = objComputer.domainWScript.Echo "strTemp: " & strTempstrTemp = GetLDAP(strTemp)arrTemp = Split(strTemp,"*",-1,1)strLDAP = arrTemp(1)WScript.Echo "strLDAP: " & strLDAPstrsystemdomain = arrTemp(0)WScript.Echo "strsystemdomain: " & strsystemdomain
strComputer = objComputer.Name If objComputer.DomainRole < 3 Then WScript.quitNext

I can set a break point right below the For Each line and it runs fine.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Debugging Mode Error

Post by Alexander Riedel »

There are certain instances where the VBScript language engine does not like being interrupted. Our current theory is that the engine looses context between instructions when you single step.
The work around is to set a breakpoint after such instructions and run over them rather than single stepping.
We are working on identifying more information.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Presumpscott
Posts: 5
Last visit: Fri Aug 09, 2013 1:51 pm

Debugging Mode Error

Post by Presumpscott »

That is annoying but I guess I can live with it. Is this fixed in 4.1?

I often step through the code line be line to be sure it is doing what I expected.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Debugging Mode Error

Post by Alexander Riedel »

Nothing has changed in that regard in 4.1
We will address this in a future service release.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Debugging Mode Error

Post by Alexander Riedel »

I guess I should add that this unexpected exception is coming from the VBScript.dll, which is a Microsoft part. The deal in fixing this is not due to us thinking it is not important, it's more of a finding out with Microsoft's help what is happening problem.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 17 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.