Link to home
Start Free TrialLog in
Avatar of thresholds
thresholdsFlag for United States of America

asked on

Debug stand alone javascript in Windows 7 (not in browser)

How can I debug a stand alone javascript file that has nothing to do with a browser or web page in Windows 7?  I have made a script that is supposed to move some files based on the create date.  I need to debug it but I can’t find any way to get a script debugger that will work on a script that is not running in a browser using Windows 7.  I was able to do this in Windows XP but I tried down loading what I thought was the proper debugger from Microsoft’s website - I can’t get it to work with a stand alone javascript file.  I looked in the Office 2010 installation and there doesn’t seem to be a debugger in there.
I tried using “debugger” at the top of the script but it is ignored.
I can’t be the only one in the world who needs to do this.  I have Visual Studio 2005 installed also if that helps but I tried getting it to work in there but it seems to be like every other javascript debugger in the world in that it only works with scripts in web pages.
Thanks
Avatar of leakim971
leakim971
Flag of Guadeloupe image

are you sure this is javascript? and not VBScript?

Anyway :
a = a + 10;
has "nothing to do" with a browser but you can debug it with the js debugger of the browser
Avatar of thresholds

ASKER

Yes I am sure it is javascript.  How can I run a javascript file in a browser?  I can open the "MoveBackups.js" file in Windows Explorer 8 but it just sits there and I don’t see any way to make it run.
The first link gives me page not found and the second won't work since You Tube is blocked here at work.  I looked at the “jonathanboutelle.com” site and I don’t see anything relevant. If the javascript is running in a web page won’t the security prevent it from being able to move files?   I don’t do web programming and have no experience with it.
Nobody makes a stand alone debugger for javascript?  Maybe I should just use C# - at least there is a good debugger.
Try this one : http://jsfiddle.net/BqpUY/

jQuery(document).ready(function() {
    $('.nav').find('ul').hide().end();
    $('.nav').find('li').click(function(e) {
        e.stopPropagation();
        $(this).children("ul").slideToggle();
    });
});

Open in new window

That looks like what I need but they don't have a version I could try w/o coughing up actual money?  I work for a non-profit agency and getting money is not easy - we haven't even had raises in 4 years.

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This one looks more like my speed.  I'll have to wait until tomorrow to do the download since our connection is extremely show during the work day.
I downloaded and installed the “Eclipse IDE for JavaScript Web Developers”.  My first reaction was that it was way more than I was looking for but it will do what I need (and a lot that I don’t need) so I thank you.
I may have spoken too soon.  I was running a script in the debugger and when it got to the line that creates a FileSystemObjcect it came to a screeching halt.  No messages but apparently it doesn't know what a FileSystemObject is.  There may be a way to reference the correct dll but it may take a while to find - there is nothing obvious.
Any ideas?