Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-02-2015, 09:40 AM
etalkishere etalkishere is offline
Registered User
 
Join Date: Sep 2015
Posts: 9
ActivePerl vs VBScript

I recently created an automation tool for network health checks. I found that, while VBScript is easy and does the job nicely (since it's very similar to Excel macros and MS Visual Basic), its integration with secureCRT from the debugging perspective is a nightmare. I had to copy certain VBScript codes/modules into the MS Visual Basics debugger, debug there. Once working I copy it back to my secureCRT's script. Problem is that, of course, certain MS VB commands/classes don't work in VBScript environment. Thus, when I execute the VBScript in secureCRT and run into run-time errors, the error message popped up and told me line xzy causing the issue, yet that xyz line isn't exactly the place. So, I had to use a bunch of msgbox to print out values and for troubleshooting. What a nightmare and unproductive.

Can you recommend a nice VBScript debugger that works well with secureCRT environment? Something that allows me to do line-per-line debugging, step into a function, see parameter values, like MS Visual Basic, would be awesome.

What about ActivePerl vs VBScript? Would activeperl be better from debugging intergration with secureCRT perspective?

Much thanks in advance for your feedbacks.
Reply With Quote
  #2  
Old 09-02-2015, 01:03 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi etalkishere,

Thanks for the post. I have created a feature request to add a VBScript debugger to SecureCRT. If we do so in the future, we will post to this thread.

Since SecureCRT doesn't expose an object, I am not sure that there will ever be a really good external debugging solution.

We have used Visual Studio to successfully debug VBScripts in SecureCRT. You have to have Visual Studio installed, and make sure that JITDebug is set to "1" in the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings
We have not discovered any way to perform debugging using ActivePerl.

If you are writing scripts complicated enough to require debugging, perhaps you could use a COM object that we offer called VRALib (included in ClientPack) which could be integrated into your own .NET application which you could use Visual Studio to debug.

Is this something you would be interested in pursuing?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 09-03-2015 at 09:56 AM.
Reply With Quote
  #3  
Old 09-02-2015, 09:56 PM
etalkishere etalkishere is offline
Registered User
 
Join Date: Sep 2015
Posts: 9
Thanks Todd. I am actually not a SW engineer, although I used to, long long time ago to start off my career. So, i will have to understand more of what you mean, especially on the Visual Studio option.

Are there past threads on the items you mentioned, with regard to debug integration with secureCRT? If so, please share.

Thanks.

PN
Reply With Quote
  #4  
Old 09-03-2015, 10:05 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi PN,

I am not aware of any threads that discuss using Visual Studio to accomplish your debugging goal.

I am not sure what else there is to explain. The process to use Visual Studio to debug scripts is as simple as using the following steps:
  • Install Visual Studio
  • Make the registry change mentioned previously
  • Run a script in SecureCRT that has a problem
You should be asked to debug the script in Visual Studio if the script has an error.

If the script is just not doing what you expect, then you would need to add the "stop" keyword to your script. This could be added at the beginning or near the code that you think is failing. When you run the script, you should be prompted to debug the script in Visual Studio.

Does this help to clarify?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 09-03-2015, 03:17 PM
etalkishere etalkishere is offline
Registered User
 
Join Date: Sep 2015
Posts: 9
That helps alot. Much thanks!
Reply With Quote
  #6  
Old 09-03-2015, 05:18 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
You are welcome. I am glad I could help.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:15 AM.