1

I have a few scripts that work fine running in the debugger, but when I publish it to IIS it's like they aren't running.

Here are the lines i'm using to include the scripts inside the head tags

<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js"></script>
<script src="<%=ResolveClientUrl("~/Scripts/")%>ScrollSpy.js"></script>

scripts are contained in Scripts folder

1 Answer 1

1

Correct me if I'm wrong but it sounds like you can't debug Javascript in VS? If so, have you considered using browser based debugging tools? Chrome, Firefox, and IE 11 have pretty great debugging tools that allow you to set breakpoints just like in Visual Studio.

There's a free course online that'll teach Google Chrome's DevTools at Codeschool - http://discover-devtools.codeschool.com/

Sign up to request clarification or add additional context in comments.

3 Comments

If it was an issue with the scripts themselves, wouldn't they also not work when VS is running the project locally?
It could be a variety of things. I'd start with the Javascript debugger in a browser to see if it loads (you'll be shown if they don't). You can run some of the functions from the command line if they do to see if they fire appropriately. As an aside, if your second script relies on the first then it could be an issue with linking to the HTTP version vs the HTTPS (depending on your browser security rules). I'd link to it as "//ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" and not use the HTTP in there.
Awesome! Best practice in the future would be just link with the "//" and without the HTTP/HTTPS. Take care. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.