<p>I just saw this mentioned in Stack Overflow question <em><a href="http://web.archive.org/web/20090503103538/http://stackoverflow.com:80/questions/7975/best-css-editor" rel="nofollow noreferrer">Best WYSIWYG CSS editor</a></em> and didn't know it could be done. I'm a Visual Studio newbie, so how do you do it?</p>
<p>Is there a separate debugger for JavaScript? I know how to work the one for code-behind pages...  I usually use Firebug to deal with debugging JavaScript code.</p>
<p>I'm using <a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2005" rel="nofollow noreferrer">Visual Studio 2005</a>.</p>

[{'answer_id': 8399, 'author': 'Ray', 'author_id': 233, 'author_profile': 'https://Stackoverflow.com/users/233', 'pm_score': 0, 'selected': False, 'text': '<p>In Internet&nbsp;Explorer, select <em>View</em> -> <em>Script Debugger</em> -> <em>Open</em>. That should do it.</p>\n'}, {'answer_id': 8401, 'author': 'Christian Hagelid', 'author_id': 202, 'author_profile': 'https://Stackoverflow.com/users/202', 'pm_score': 2, 'selected': False, 'text': '<p>TechRepublic has a good walk through - see <em><a href="https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/programming-and-development/?p=672" rel="nofollow noreferrer">Visual Studio 2008 simplifies JavaScript debugging</a></em>.</p>\n'}, {'answer_id': 8413, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 2, 'selected': False, 'text': '<p>Visual Studio 2008 ASP.NET projects has debugging enabled by default. You can set breakpoints within your .js file while the website/web app project is run in the ASP.NET debug server.</p>\n'}, {'answer_id': 8433, 'author': 'brendan', 'author_id': 225, 'author_profile': 'https://Stackoverflow.com/users/225', 'pm_score': 4, 'selected': True, 'text': '<p>I prefer using <a href="http://en.wikipedia.org/wiki/Firebug_%28software%29" rel="nofollow noreferrer">Firebug</a> for projects I can\'t use <a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2008" rel="nofollow noreferrer">Visual&nbsp;Studio&nbsp;2008</a> on.</p>\n'}, {'answer_id': 13127, 'author': 'ScottKoon', 'author_id': 1538, 'author_profile': 'https://Stackoverflow.com/users/1538', 'pm_score': 3, 'selected': False, 'text': '<p>To debug in Visual&nbsp;Studio&nbsp;2005, make sure that "disable script debugging" is unchecked. Then load your webpage in Internet&nbsp;Explorer. From the debug menu inside of Visual&nbsp;Studio&nbsp;2005, select "Attach to process" and pick the instance of Internet&nbsp;Explorer that has your web page loaded.</p>\n\n<p>Alternatively, the <a href="http://en.wikipedia.org/wiki/Firebug_%28software%29" rel="nofollow noreferrer">Firebug</a> team has been working on a "lite" version that you can include either as a script in your page or by launching it via a bookmarklet from your browser. It doesn\'t provide the full debugger that Firebug does, but it gives you a console and a command line from which you can inspect variables and log things to the console.</p>\n'}, {'answer_id': 16793, 'author': 'Jason Bunting', 'author_id': 1790, 'author_profile': 'https://Stackoverflow.com/users/1790', 'pm_score': 0, 'selected': False, 'text': '<p>Usually you know where you are having problems, so you can set a breakpoint in your JavaScript code by placing the keyword "debugger;" on a line in your JavaScript code (obviously without the quotes) to set a breakpoint. </p>\n\n<p>When you get to it in Internet&nbsp;Explorer, it will ask you if you want to debug and prompt you to choose a debugger from a list, hopefully you will see Visual Studio in that list (both a new instance as well as your currently-running instance) - if you are using <a href="http://en.wikipedia.org/wiki/Mozilla_Firefox" rel="nofollow noreferrer">Firefox</a> with <a href="http://en.wikipedia.org/wiki/Firebug_%28software%29" rel="nofollow noreferrer">Firebug</a>, it will automatically stop execution on that line and you will be within the Firebug debugger, not Visual Studio.</p>\n\n<p>You will want to do the following to setup Internet&nbsp;Explorer for doing this - from within Internet&nbsp;Explorer, follow this menu path: <em>Tools</em> > <em>Internet Options</em> > <em>Advanced Tab</em> > <em>Uncheck</em> the "Disable Script Debugging" options.</p>\n'}, {'answer_id': 16855, 'author': 'Johnno Nolan', 'author_id': 1116, 'author_profile': 'https://Stackoverflow.com/users/1116', 'pm_score': 0, 'selected': False, 'text': '<p>Yeah using <strong>Microsoft Script Editor</strong> is a an option if you have Office XP or Office 2003 installed. In IE uncheck Disable Script debugging (Internet Explorer) and Disable Script debugging (Other).</p>\n\n<p>Restart IE. In View menu you will have a new item, "script debugging", choose open. You will be given a choice of VS2005 or New instance of Microsoft Script Editor, choose that and give it a go.</p>\n\n<p>Edit: try <a href="http://jonathanboutelle.com/2006/01/16/how-to-debug-javascript-in-internet-explorer/" rel="nofollow noreferrer">this</a> link for a tutorial</p>\n'}, {'answer_id': 16898, 'author': 'Haydar', 'author_id': 288, 'author_profile': 'https://Stackoverflow.com/users/288', 'pm_score': 0, 'selected': False, 'text': '<p>You can set a breakpoint within JavaScript in Visual&nbsp;Studio&nbsp;2005, but in addition to debugging needing to be enabled in Internet&nbsp;Explorer, you can only set the breakpoint in a .js file. You cannot debug any inline JavaScript code. </p>\n\n<p>I also sometimes have problems when trying to debug my JavaScript code when using the attach process method to go into debugging. I will normally use the "Start debugging" green arrow. You will know that your code will stop at the breakpoint in your .js file if the breakpoint icon (Burgandy Circle by default) is filled in. If it\'s not filled in, you will never stop there.</p>\n\n<p>Finally, make sure you have debugging enabled in your <a href="http://en.wikipedia.org/wiki/ASP.NET" rel="nofollow noreferrer">ASP.NET</a> configuration settings.</p>\n'}, {'answer_id': 26416, 'author': 'David Basarab', 'author_id': 2469, 'author_profile': 'https://Stackoverflow.com/users/2469', 'pm_score': 1, 'selected': False, 'text': "<p>Just make sure you have 'Disable Script Debugging' unchecked, and just hit F5 to start debugging in VS2005 or 2008.</p>\n\n<p>I would also note that if you have  your JavaScript inside the .aspx page you will have to find it via the script explore.  However if you have it in a separate .js file you can just put a break point on it like you would any .cs file.</p>\n"}, {'answer_id': 26427, 'author': 'Dave Ward', 'author_id': 60, 'author_profile': 'https://Stackoverflow.com/users/60', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>I usually use Firebug to deal with debugging JS.</p>\n</blockquote>\n\n<p>Unless you need to debug in IE, there's no need to stop using Firebug.  It works with JavaScript in ASP.NET pages just as well as it does with any other type of page.</p>\n\n<p>Visual Studio's JavaScript debugging is alright, but really cannot compete with the full range of client-side information that Firebug aggregates.</p>\n"}, {'answer_id': 684749, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Debugging client JavaScript code in Visual Studio 2005:</p>\n\n<p>Add the following code to the start of the JavaScript code:</p>\n\n<pre><code>debugger\n</code></pre>\n\n<p>See <em><a href="http://cubemsoft.blogspot.com/" rel="nofollow noreferrer">Debugging client JavaScript in Visual Studio 2005</a></em>.</p>\n'}]
['https://Stackoverflow.com/questions/8398', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/396/']