VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   Using Debuggers for VBScript (https://forums.vandyke.com/showthread.php?t=12363)

ShawnVW 05-20-2016 04:00 PM

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 (Post 44500)
<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?

jdev 05-21-2016 01:17 PM

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


All times are GMT -6. The time now is 11:05 AM.