|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
WSC error. Unknown line number.
When an error occurs in a .WSC component, how can I get the line number within the component of the error?
The browser reports the line number where the error occurred in the calling code, not within the component itself. Any suggestions welcome. Thanks. I'm using Notepad.exe and Microsoft IIS. |
|
#2
|
||||
|
||||
|
You won't be able to because the error occurs within the component. The component is executed by an outside source. (The Windows Script Host) The browser can only display errors that occur within the browser.
You'll need to use a script debugger capable of debugging the WSC itself or a debugger that is capable of debugging the actual memory stack. Microsoft's Script Debugger should help. Add this line to your WSC's registration section:You can download the script debugger here.
__________________
Scripting problems? Windows questions? Ask the Windows Guru! Stay up to date with all of my latest content. Follow me on Twitter! Help us help you! Post your exact error message with these easy tips! Last edited by Nilpo : August 18th, 2009 at 12:56 AM. |
|
#3
|
|||
|
|||
|
Thanks Nilpo.
When the debugger started, it used to just come up blank. Also it seems to have a very strange non-standard menu system. However now I can't even get it to start and I'm not sure why. What do you think of the Microsoft Script Debugger? Do you use it? Would you recommend it or is there a better solution? The documentation says (c) 1997. I've just started playing with WSC files and I quite like them apart from the difficulty of debugging them. |
|
#4
|
||||
|
||||
|
I do indeed use the Script Debugger. I debug most of my scripts in PrimalScript (uses the PrimalScope debugger). However, I do use the Microsoft Script Debugger as well. It's put together very well.
In the code of your WSC file, add the keyword STOP anywhere that you would like to add a debugging breakpoint. Also, make sure that Script Debugging is enabled in Internet Explorer. (Internet Options > Advanced tab). |
|
#5
|
|||
|
|||
|
Thanks.
I'll give it another go. |
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > WSC error. Unknown line number. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|