![]() |
|
#1
|
|||
|
|||
|
Debugging vb scripts
Hi,
how to debug vb and perl scripts. Thank you |
|
#2
|
||||
|
||||
|
I haven't personally used the script debugger with the perl language, but debugging VBScripts that run in SecureCRT should be possible by using the following steps. Microsoft documentation for the debugger states, "If you have installed an alternative scripting language that supports host-independent debugging, such as REXX or Perl, you can also debug scripts in that language", but I can't speak from experience with respect to perl so the example given below is provided in VBScript.
Here are the details: 1. Install the Microsoft Script Debugger tool: Download and install the Microsoft Windows Script Debugger for your particular Windows platform from the Microsoft scripting site: http://www.microsoft.com/downloads/d...DisplayLang=en2. "Activate" the script debugger tool. Sometimes this step may not be necessary, but I just ran into an experience with a new computer recently in which the keyword "Stop" had no effect with respect to launching the script debugger. These are the steps I followed (not sure which ones are "required", but after I did these things, the "Stop" keyword worked to bring up the debugger): - Write a simple VBScript that uses the "Stop" keyword. For example:
If the debugger comes up automatically, you should now be able to debug scripts written for SecureCRT by including the "stop" keyword within your script code (Step 3 below).3. Include the keyword "stop" within the SecureCRT script you are working on. - On the line just before the segment of code that you wish to debug, insert the keyword "Stop" as in the example code provided above. - Run the script from within SecureCRT as you normally would with Script/Run or using a keyboard shortcut, etc. Once the script interpreter encounters the "stop" keyword, the debugger should be launched and you should be able to step through your scripts, monitor the value of certain variables, etc. as described in the script debugger documentation provided by Microsoft: http://msdn2.microsoft.com/en-us/library/ms532989.aspx Appendix The Microsoft Script Editor which ships with Office is much more user-friendly than the Microsoft Script Debugger interface (setting up watches, value-triggered break-points, etc). If you have office installed, you can activate the Microsoft Script Editor by following these steps:
Also, if you have MS DevStudio installed, you might also be able to use the built-in debugging tools there with the same user-friendly debugging features mentioned above. Last edited by jdev : 11-24-2008 at 01:10 PM. |
|
#3
|
|||
|
|||
|
Thanks a lot. I will test ...
|
|
#4
|
|||
|
|||
|
Contents of variables
Is there an eaiser way than the command window to see the contents of your variables?
|
|
#5
|
||||
|
||||
|
Quote:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|