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 05-20-2016, 04:00 PM
ShawnVW ShawnVW is offline
Registered User
 
Join Date: May 2016
Posts: 15
Using Debuggers for VBScript

I need to be able to debug my VBscript by stepping through it, so I've been investigating debugging tools. VanDyke's Todd posted this on a different thread:

Quote:
Originally Posted by rtb View Post
<snip>

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
I installed Visual Studio, but the idea of attempting a registry change to my boss's computer fills me with apprehension.

So first I started Visual Studio and opened my script, to see if there were any issues that would make me look for a different solution. Sure enough, the "Start Debugging" command is greyed out.

Is that because I didn't make the registry change? Or could there be some other silly reason?

Meanwhile, I found another debugger called VBSEdit (http://www.vbsedit.com/) which seems simple enough. However, running their "debug" only seems to check my script for errors with, without any effect on my SecureCRT window. I know I'm missing something, and I'm not even sure that stepping through the code is even possible this way.

Is anyone familiar with these products?
Reply With Quote
  #2  
Old 05-21-2016, 01:17 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 919
I'm not familiar with VBSEdit.

If you want to debug w/in Visual Studio or any debugger, it's my understanding that you'll need to set the registry key Todd's post references.

The "JIT" is for "Just In Time", which is specific to how debugging ActiveX Scripts works in Windows.

If you don't set the registry key, you won't be able to intercept the script interpreter and tell it to go into Debug mode.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply

Tags
debugging , vbscript , vbsedit , visual studio


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 06:50 AM.