VS 2008 JavaScript Debugging

A few weeks ago I blogged about the new JavaScript Intellisense support in VS 2008.

One of the other JavaScript features that I'm sure will be popular in VS 2008 is the much-improved support for JavaScript debugging.  This is enabled in both the free Visual Web Developer 2008 Express edition as well as in Visual Studio, and makes using JavaScript and building AJAX applications significantly easier.

Setting JavaScript breakpoints in ASP.NET pages

One of the annoying things with VS 2005 is that you have to first run your ASP.NET pages before you can set JavaScript breakpoints in them in the debugger.  

VS 2008 makes this much better by adding new support that allows you to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files:

When you set a breakpoint in your .aspx page like above, VS 2008 will automatically map the breakpoint location to the dynamically generated client HTML that runs in the browser when the page is later executed:

If you add/remove/update the breakpoint locations in the running HTML document, VS 2008 is also now smart enough to perform the reverse mapping and update the breakpoint in the original .aspx or .master source file on the server.  This makes it much easier to get into a nice edit/debug/edit/debug flow as you are iterating on your applications.

Best of all, you can now set both client-side JavaScript breakpoints and VB/C# server-side breakpoints at the same time (even in the same page) and use a single debugger to step through both the server-side and client-side code in a single debug session (which is extremely useful for any AJAX heavy application).

Any JavaScript breakpoints you set will also now by default be saved by VS 2008 when you close the project/solution.  When you open up the project again, the previous locations you set the breakpoints on will still have them enabled. 

Script Document Navigation within the Solution Explorer

Often the JavaScript that is sent down to a browser client is dynamically generated on the server (for example: with scripts that are stored as resources within compiled server controls - like ASP.NET AJAX UpdatePanels and control extenders).  In scenarios such as these, you want to be able to easily see all JavaScript URLs being loaded from a page, as well as step into the within the debugger.

VS 2008 makes it much easier to-do this by integrating the running Script Document feature (that in VS 2005 was a separate tool-pane window) into the VS 2008 solution explorer view when you are debugging a web application. 

Specifically, when you are using VS to run and debug a page, VS 2008 will now list all of the script URLs that the page you are debugging has loaded in the browser at the top of your VS solution explorer pane:

You can then double click on any of the URLs under the "Script Documents" node at the top to see the JavaScript file that was loaded in the page:

You can obviously then set breakpoints in the loaded JavaScript and debug everything. 

Much Richer Debug Watch/Locals and Visualizer Support

Easily opening and navigating JavaScript files in the debugger is nice - but the real meat of the improvements made with VS 2008 JavaScript debugging is in the much improved object execution and inspection support.  When you inspect a variable within the debugger using VS 2008, you'll find much more detailed object information is now available:

You can now browse runtime object methods:

You can now browse runtime object events:

And you now get much, much more detailed property and property type information of running objects.  Note below how I am traversing the div element's "parentElement" property to dynamically look up details about the element's parent HTML element and overall position within the HTML DOM:

You can obviously use the debugger property grid above to both lookup as well as set values.  You can also run code in the immediate window to retrieve and change JavaScript at runtime:

VS 2008 also provides support for pluggable debug visualizers that you can use with JavaScript debugging.  This enables developers to add extensions to the debugger that can work against running objects and provide richer visualization views of them.  For example, we could use the built-in "Text", "XML", or "HTML" visualizer to load a dialog to better inspect a value:

I suspect we might see a cool CodePlex project providing nice JSON and REST JavaScript visualizers soon. 

Summary

The above walkthrough hopefully provided a good overview of some of the new JavaScript debugging features coming soon.  There are many more JavaScript and AJAX features coming in VS 2008 and .NET 3.5 that I'll be covering in future blog posts. 

Note that because of the new VS 2008 multi-targeting support, you can use the JavaScript debugging features above with both ASP.NET applications built using .NET 3.5 (which also now has ASP.NET AJAX built-in), as well as with existing ASP.NET 2.0 applications (including ones that use the separate ASP.NET AJAX 1.0 download). This, combined with the new VS 2008 JavaScript intellisense support, provides a very compelling reason to start using VS 2008 - even if you are using it to only target .NET 2.0 applications.

Hope this helps,

Scott

P.S. To learn more about VS 2005 JavaScript Debugging, please read this blog post.  Dan Wahlin also recently posted a nice set of AJAX testing and debugging tools that I recommend checking out here.

Published Thursday, July 19, 2007 11:29 PM by ScottGu

Comments

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 2:46 AM by Ruchit S

Hi Scott,

This is one of the most awaited featurs of 'Orcas'. great job. JS intellisense + debugging will make a great difference.

Thanks 4 this.

Ruchit S.

http://ruchitsurati.net

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 2:50 AM by John C. Bland II

That's definitely amazing stuff Scott! I can't wait for this puppy to be released! :-D

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 3:14 AM by Ken Egozi

This is why I'll be switching to VS2008, if That was not enough ...

www.kenegozi.com/.../javascript-debugging-made-easy-even-in-internet-explorer.aspx

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 3:16 AM by James

wow - you really hit the ball out of the park on this one. can't wait for beta 2 to start using it :)

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 3:32 AM by stm

I have comments to the script navigation window:

a) scriptresource.axd?d=Ehsahzs... means nothing. It would be usefull to provide the original resource name also. If that not possible maybe show the first lines of the script. Using heavily ajax, ajaxcontrol toolkit and custom script, it's a big pain to identify the correct script.

b) What about firefox support?

And finaly:

What about setting breakpoints in external js files similar to asp.net pages? Ok this is a dream :)

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 3:45 AM by ScottGu

Hi stm,

>>>>>> I have comments to the script navigation window: a) scriptresource.axd?d=Ehsahzs... means nothing. It would be usefull to provide the original resource name also. If that not possible maybe show the first lines of the script. Using heavily ajax, ajaxcontrol toolkit and custom script, it's a big pain to identify the correct script.

That is a good suggestion - I'll forward to the feature crew to see whether they can do anything like this.

>>>>>> b) What about firefox support?

Unfortunately each browser has different debug APIs - so building a universal debugger for IE, FireFox and Safari is pretty hard.  You can use this blog post to learn how to change the default VS browser to be FireFox weblogs.asp.net/.../430943.aspx - but you won't get the full debugging support for it.

>>>>>>>> And finaly: What about setting breakpoints in external js files similar to asp.net pages? Ok this is a dream :)

I should have made that clearer - that is actually fully supported as well.  Just hit F9 to set a breakpoint on any line in an external .JS file.  So hopefully your dream just came true. :-)

Thanks,

Scott

# My Space In The Net » Blog Archive » VS 2008 JavaScript Debugging - From Scott Guthrie

Pingback from  My Space In The Net  » Blog Archive   »  VS 2008 JavaScript Debugging - From Scott Guthrie

# VS 2008 JavaScript Debugging - ScottGu's Blog

Friday, July 20, 2007 4:04 AM by VS 2008 JavaScript Debugging - ScottGu's Blog

Pingback from  VS 2008 JavaScript Debugging - ScottGu's Blog

# VS 2008 JavaScript Debugging

Friday, July 20, 2007 4:11 AM by DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 4:13 AM by Manuel Abadia

Wow,

you know how to make us to be interested in VS 2008. I'm really glad that now we could use DebuggerVisualers with javascript.

And talking about DebuggerVisualizers.... In VS 2005 you can't associate a visualizer to an interface. You have to associate it to a class. Is there any chance to have this behaviour modified? It is sad to have a DebuggerVisualizer for a IList but have to add an attribute for each class that implement IList in order to use it.

# Debug di JavaScript con VS 2008

Friday, July 20, 2007 4:21 AM by Blog di LucaB

In questo post Scott Guthrie illustra le nuove caratteristiche del debug di JavaScript in VS 2008 (anche

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 4:58 AM by Steven Nagy

Hey ScottGlue, I agree with the statement by STM about webresource.axd?d=Ehsahzsasdasdfas...

We use embedded resources for our main product to make deployment easier. Unfortunately debugging is painful. We're moving to .Net 3.5 for the next version (hopefully) and will be one of the first to do so here in Australia. But I need you to fix that problem first!

Also, in Beta1, I can't comment script in a .js file via shortcut key, but I CAN do it from the web form designer; weird!

Also, I liked your work on the LINQ posts/video. Recommend any good books based around more recent versions of 3.5 LINQ? And can you convince Paulita to update BLINQ to use more recent version (rather than May 2006 CTP)?

Keep on truckin.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 5:25 AM by Jinho Seo

Scott, This is a cool news. i think the most difficult language is Javascript. welcome to debugging javascript in Visual Studio 2008.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 5:30 AM by Boris Yeltsin's Zombie

This is awesome Scott. This is EXACTLY the sort of features we need. Much smarter tools mean much faster and more polished development. I'm sat here waiting with baited breath for Beta 2 so I can start putting together some serious projects on 2008.

2 requests:

1) Let's get an ASP.NET AJAX managed MSDN newsgroup. It's a pain when people get no answers to their AJAX questions in the web forum - and we all have to just sit there trying to figure out the problems for ourselves with no input from Microsoft. It's like the developers just pick off the easy threads to answer. I often need the ability to FORCE an answer, which is where managed newsgroups are so awesome.

2) I'm hearing of a couple of bugs in the 1.0 AJAX (abbrMonthNames etc). I realise an update for this could be ages away. I'm pretty sure almost any bug could be "patched" by a small JavaScript chunk that people could throw into their code. ASP.NET AJAX targets products out of your control - i.e. Safari, Firefox, Opera - so it needs to be faster moving. How about a quick patch?

Cheers!

- BY's Zombie

# University Update-AJAX-VS 2008 JavaScript Debugging

Friday, July 20, 2007 5:52 AM by University Update-AJAX-VS 2008 JavaScript Debugging

Pingback from  University Update-AJAX-VS 2008 JavaScript Debugging

# Izindaba #1

Friday, July 20, 2007 6:30 AM by From the software development trenches

I try to publish a short, weekly roundup of news that focuses on .NET and MS development related content

# » My Space In The Net ?? Blog Archive ?? VS 2008 JavaScript Debugging …

Pingback from  » My Space In The Net ?? Blog Archive ?? VS 2008 JavaScript Debugging …

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 8:29 AM by Anonymous

Fantastic.... must wanted stuff. cant wait the release of VS 2008.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 8:46 AM by Mike

Looks very promising, I have been using Firebug, but integration with the IDE is very welcome.

What is the usage scenario for browsing runtime methods and events (in C# debugging I only see properties)?

In some screenshots I see the type displayed as DispHTMLFormElement, I don't think I've ever heard of that. Is type based on official DOM types, or are we looking the type IE is reporting (which might be different because IE is not known for supporting web standards very well)?

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 8:58 AM by Tom

When will the Beta 2 bits be available?

Thanks!

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 9:18 AM by overred

good ,that's a good news for me

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 9:22 AM by Vikram

yes the javascript debugging and intelligences is one of the best upgrades in VS 2008

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 9:34 AM by PBZ

Is there a way to profile JS using VS2008? Something akin to FireBug's console.log would be enough. I had some performance issues with some JavaScript on IE7 (all the other browsers were fine) and troubleshooting this situation turned out to be a major pain. If VS2008 doesn't have anything like this do you know of a tool that could help? Searching online didn't turn up anything useful. Thank you!

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 9:37 AM by Josh Stodola

I must admit I was pretty skeptical about debugging the server-generated javascript, and of course you have already got that covered.  Un-freakin-believable!  I plan to hibernate until this is released, I can't consciously wait much longer!!  Very impressive stuff, Scott.  Thanks for yet another highly informative and intriguing post.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 10:00 AM by Colin Ramsay

Adding js debugging for multiple browsers may be "pretty hard", but in order to make this a genuinely useful feature it's pretty necessary. For developers who need to create a consistant experience across platforms this new support doesn't really cut the mustard.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 10:20 AM by Maulik

Hi Scott,

Nice post as usuall.

I'd like to drag your attention to one point that I tried to remove the break point at runtime (I use BETA 1) but it didnt let me remove it. Does it allow in BETA 2??

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 10:28 AM by Chinmay Joshi

Hi Scott this sounds good !

# » ?? My Space In The Net ?? Blog Archive ?? VS 2008 JavaScript …

Pingback from  » ?? My Space In The Net ?? Blog Archive ?? VS 2008 JavaScript …

# 3 Links Today (2007-07-20)

Friday, July 20, 2007 11:19 AM by 3 Links Today (2007-07-20)

Pingback from  3 Links Today (2007-07-20)

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 12:36 PM by Sam

Hi Scott-

Will VS2008 VSTS support code coverage for JavaScript?

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 2:11 PM by elixir

now this is why i stay coding ms techs!

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 2:21 PM by Jeff

Scott, the JS Debugging tool definitely looks sweet! Will this JS Debugging be available in the VWD Express edition as well? And any idea when Beta 2 of VWD Orcass will be out?

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 3:43 PM by John S.

will beta2 be out soon?  please?!?

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 4:16 PM by Alex Rose

Couldn't help but notice that the top 2 screenshots in this post seem to be taken on a different OS than the bottom ones.  My guess is the top 2 were taken on server 2008 and the rest were taken on vista.  The title bar gave it away (color, transparancy).  Am I right?

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 4:53 PM by Erik Madsen

Scott, I think your blog is great.  Lots of detailed technical information that the developer community needs.

But I just have to say I'm glad I don't use AJAX in my web projects.  (We all know the renewed focus on Javascript is due to AJAX.)  I do realize there is a narrow set of justifiable uses- status bars and such- but I think the Web 2.0 / AJAX community is too vocal and greatly exaggerates their importance.  Look at all the hoops they have Microsoft developers jumping through just to make AJAX maintenance and debugging tolerable.  Most often it makes more sense to put the complex runtime & dev tools in the server tier, where the environment can be stringently controlled, and leave the Wild West UI tier vanilla-plain.  Web 2.0 / AJAX inverts this.  I remain wary of the wisdom of this.

Great job improving this new programming model.  Just don't forget about us Web 2.0 skeptics.  Those of us who mistrust the user and his myriad browser & PC configurations.

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 6:25 PM by Ken

The intellisense is awesome but a bit intrusive.  Is there a way to set it to match case as well?  Our Javascript objects often have properties that match intellisense properties somewhat.  For example obj.Val or obj.Value require you to hit escape to lose the intellisense box or obj.valueOf will be automatically chosen.  If the box would only show up with a case match that would save a lot of hits to the escape key.  If you use a Microsoft Natural Ergonomic Keyboard you know how annoying reaching for that escape key can be.

Keep up the great work, it is very much appreciated!

--- Ken

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 7:57 PM by DotNetUrls.com

Very nice feature, you've done a good job. thanks!

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 9:13 PM by Steve

Question:

If I use a $get()  it doesn't have intellisense on that object.  (ie. above example and innerHTML)

Is this something that will be added or is it even possible?

Thanks - great stuff, this alone will make me gladly buy my next version of VS  :)

# re: VS 2008 JavaScript Debugging

Friday, July 20, 2007 11:39 PM by Zeeshan

Scott, Can i open up asp.net 2.0 project in VS 2008 and then be able to open up in vs 2005. cuz i would really like to go ahead and start using the product with go live license. however many developers in my company wont be willing to do that. It would be nice for me to be able to open the same project from source safe using VS 2008 check in my stuff. and others can check out using vs 2005.

Thanks

Zeeshan Hirani

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 1:59 AM by ScottGu

Hi Tom,

>>>>> When will the Beta 2 bits be available?

The good news is that Beta2 is less than a week away.... ;-)

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:01 AM by ScottGu

Hi Maulik ,

>>>>>>>> I'd like to drag your attention to one point that I tried to remove the break point at runtime (I use BETA 1) but it didnt let me remove it. Does it allow in BETA 2??

That is odd - did you press F9 on the line to toggle the breakpoint?  That should always work.

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:02 AM by ScottGu

Hi Jeff,

>>>>>> Scott, the JS Debugging tool definitely looks sweet! Will this JS Debugging be available in the VWD Express edition as well? And any idea when Beta 2 of VWD Orcass will be out?

Yep - the JS debugging support is available in the free VWD Orcas release as well as the full VS.  Beta2 should be out in the next week.

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:05 AM by ScottGu

Hi Alex,

>>>>>> Couldn't help but notice that the top 2 screenshots in this post seem to be taken on a different OS than the bottom ones.  My guess is the top 2 were taken on server 2008 and the rest were taken on vista.  The title bar gave it away (color, transparancy).  Am I right?

Actually - all but the last two screen-shots were taken from my laptop.  The title-bar on my Vista theme changes to dark when you are in maximized mode (which I was in the first two screen-shots), and then in transparent when the window is not maximized.

The last two screen-shots at the very bottom came from an earlier blog post someone else on my team had made about debugging.  Rather than redo them I figured I'd just re-use the screen-shots and add my own text around them. :-)

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:24 AM by ScottGu

Hi Steve,

>>>>>> If I use a $get()  it doesn't have intellisense on that object.  (ie. above example and innerHTML).  Is this something that will be added or is it even possible?

I think this is a feature that might be added for the final release.  There is some trickiness to resolving the exact DOM element that is referenced - but I know the team is looking at how it can be implemented.

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:26 AM by ScottGu

Hi Zeeshan,

>>>>>> Scott, Can i open up asp.net 2.0 project in VS 2008 and then be able to open up in vs 2005. cuz i would really like to go ahead and start using the product with go live license. however many developers in my company wont be willing to do that. It would be nice for me to be able to open the same project from source safe using VS 2008 check in my stuff. and others can check out using vs 2005.

The project file format can be used with both VS 2005 and VS 2008 as long as you copy the targets file onto machines that don't have VS 2008 installed (this is an XML file with manifest definitions).

However, the .SLN solution file is version specific - which means you you can't open a VS 2008 .SLN file that points to projects with VS 2005.  You'd need to maintain two .SLN files - one for VS 2005 and one for VS 2008 if you want to swap projects back and forth between them.

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 2:27 AM by ScottGu

Hi Ken,

>>>>>> The intellisense is awesome but a bit intrusive.  Is there a way to set it to match case as well?  Our Javascript objects often have properties that match intellisense properties somewhat.  For example obj.Val or obj.Value require you to hit escape to lose the intellisense box or obj.valueOf will be automatically chosen.  If the box would only show up with a case match that would save a lot of hits to the escape key.  If you use a Microsoft Natural Ergonomic Keyboard you know how annoying reaching for that escape key can be.

I believe the JavaScript intellisense is case sensitive.  If you want to email me a sample of a page you are having problems with, I'd be happy to loop you in with the team for them to test it.

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 6:26 AM by Eric Suen

>> VS 2008 also provides support for pluggable debug visualizers

Where can I find the document or examples?

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 12:11 PM by Nathan

I first saw this at Mix and was absolutely blown away!  Great job!

I would also like to throw in my request for full firefox and safari support.  Unfortunately the browsers are different enough that I always run into some incompatability with each project.

I wonder if you can use the same proxy for mac you built for silverlight to allow debugging javasript on mac safari?

All in all though, my hats off to you and your team, absolutely outstanding!

-Nathan

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 4:42 PM by Ben Hayat

Hi Scott;

An OT question:

a) Will there be a newer version of SilverLight SDK 1.1 along the next version of VS2008 Beta 2?

b) Will there be design-time support for SilverLight 1.1 and WPF in Beta 2?

Thanks!

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 6:10 PM by ScottGu

Hi Ben,

>>>> Hi Scott; An OT question: a) Will there be a newer version of SilverLight SDK 1.1 along the next version of VS2008 Beta 2?

Yes - our plan is to have an updated Silverlight 1.1 SDK in the next week.  It will work with VS 2008 Beta2.

>>>> b) Will there be design-time support for SilverLight 1.1 and WPF in Beta 2? Thanks!

VS 2008 Beta2 ships with a built-in WPF designer and project system support.  I think you'll find it is a pretty good way to start developing WPF applications.

Silverlight 1.1 support within VS 2008 will be provided by a separate Silverlight SDK download that you install on top of VS 2008.  

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 7:34 PM by Ben Hayat

Hi Scott;

>> I think you'll find it is a pretty good way to start developing WPF applications.

I think that's all I can ask at this stage of beta, just to get started...

Scott, I think for my next web app, I'm really going to use Silverlight and LINQ as much as possible. In one of your posts, you told me if I'm going to do full database interaction with SilverLight in the next six months, I should consider ASP.Net.

My question to you is, are there any guidelines as to what 1.1 can do and what it can't do? This way we can create a strategy up front what parts of project we should do in ASP.Net and what parts in SilverLight, before we find out in a hard way. I think in one of your blogs, it would be helpful to have a functional list.

Secondly, I've been asked whether SilverLight will run on Windows2000. Seems like many people are still running machines with Win2K.

And I sincerely thank you for answering all my questions.

# re: VS 2008 JavaScript Debugging

Saturday, July 21, 2007 8:01 PM by Ben Hayat

Hello Scott;

On the second note, I was reading an article last night about iPhone and it said, iPhone's biggest strength isn't it's phone, but rather it's wireless browser. Since the device is running on Mac OS X, do you think MS is planning to support this device with SilverLight? This is the only portable device I've seen, that has usable screen and processing power.

# re: VS 2008 JavaScript Debugging

Sunday, July 22, 2007 3:59 AM by Ali

in VS2005, things are looking different when previewing in IE7 and firefox. Will there be any browser computability checking in VS2008? web parts looses styles when viewed in firefox.

# re: VS 2008 JavaScript Debugging

Sunday, July 22, 2007 9:53 PM by Zeeshan

Scott,

I forgot to ask another question. How expensive is it to create a datacontext and what happens under the convers when i new up an instance of datacontext. like in the case if i am using a mapping file options which maps my objects to tables. and i could have 300 tables and my mapping file could be really big. is it worth while to new up a datacontext on every webrequest in web application scenario. Wouldn't it be potentially bad in terms of performance. Is it better to create a singleton instance of datacontext that is alive for the remainder of app domain and only gets created when the app domain restarts.

Another question is say i retrieved an object from the datacontext modified it and later down cancelled my update to database. if i were to retrieve my object again would i retrieve a fresh copy from the database or since linq is tracking the object it will retrieve from it cache and i will get the object which was potentially cancelled from update. Please explain. Your posts are really awesome. Keep up the good work.

# VS 2008 Javascript debugging « Dennis van de Laar

Monday, July 23, 2007 3:50 AM by VS 2008 Javascript debugging « Dennis van de Laar

Pingback from  VS 2008 Javascript debugging « Dennis van de Laar

# re: VS 2008 JavaScript Debugging

Monday, July 23, 2007 10:08 AM by plq

Looks good. If I may I would like to add the following:

- vs2005 does have the ability to pick up F9 breakpoints in js files on first refresh

- There is a "debugger;" javascript statement in vs2005 which allows direct stopping at a line of code on first page refresh

- remember that js files are cached by the browser so you get better performance compared to embedding javascript in an aspx file if you have say more than 100 lines of code

# re: VS 2008 JavaScript Debugging

Monday, July 23, 2007 10:32 AM by Ben Scheirman

Firebug for Firefox is what I really want for IE development.

That tool is so lightweight and easy to use, it's no wonder that people hate Javascript development in IE.  (which attributes to the general consensus that Javascript is a pain to work with -- it doesn't have to be).

What's stopping the IE team from porting it to IE?

# Visual Studio 2008 Beta 2 less than a week away! - Noticias externas

Pingback from  Visual Studio 2008 Beta 2 less than a week away! - Noticias externas

# re: VS 2008 JavaScript Debugging

Monday, July 23, 2007 4:06 PM by Hans

Thanks to you and the JS team

Question: When we code a JS object inherited from a base JS class(supported by ASP .NET AJAX), can we see the intellisense as code behand - a dropdown with all properties and methods in both current class and base class?

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 9:07 AM by Chilá

Could we use VS2008 within Framework 2.0/3.0??

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 11:29 AM by Adam Plocher

Hi Scott, this is an incredible feature!  If VS wasn't already the best web dev tool on the market before, it certainly will be soon.

I have one question though.  Will it be possible to debug stand-alone scripts without asp.net?  What about with modules like VS.PHP, could the author of that module do something to utilize these JS debugging features?

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 1:11 PM by ScottGu

Hi Ben,

>>>>>> On the second note, I was reading an article last night about iPhone and it said, iPhone's biggest strength isn't it's phone, but rather it's wireless browser. Since the device is running on Mac OS X, do you think MS is planning to support this device with SilverLight? This is the only portable device I've seen, that has usable screen and processing power.

I'd like to support Silverlight on the iPhone - but right now Apple is not allowing third party software to be installed on the device.  So we'll have to see whether this changes in the future.

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 1:13 PM by ScottGu

Hi Ben,

>>>>>> My question to you is, are there any guidelines as to what 1.1 can do and what it can't do? This way we can create a strategy up front what parts of project we should do in ASP.Net and what parts in SilverLight, before we find out in a hard way. I think in one of your blogs, it would be helpful to have a functional list.

I'm planning on covering this more in the future with some blog posts.  Right now the V1.1 functionality is still limited for data entry scenarios (no textbox, no core set of controls, and no databinding) which makes it very hard to build data entry LOB applications using it.  This will change in the future as though features come online.

>>>>>> Secondly, I've been asked whether SilverLight will run on Windows2000. Seems like many people are still running machines with Win2K.

Right now our plan is to support Windows 2000 as well with Silverlight in the future.

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 1:14 PM by ScottGu

Hi Ben,

>>>>>>> Firebug for Firefox is what I really want for IE development. That tool is so lightweight and easy to use, it's no wonder that people hate Javascript development in IE.  (which attributes to the general consensus that Javascript is a pain to work with -- it doesn't have to be).  What's stopping the IE team from porting it to IE?

I believe some teams are looking at making this available as well for lighter-weight debugging outside of the VS IDE.

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 1:15 PM by ScottGu

Hi Adam,

>>>>>> I have one question though.  Will it be possible to debug stand-alone scripts without asp.net?  What about with modules like VS.PHP, could the author of that module do something to utilize these JS debugging features?

Yes - you'll be able to debug any client-side JavaScript using VS 2008 - it isn't limited to only working with ASP.NET pages.

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Tuesday, July 24, 2007 1:16 PM by ScottGu

Hi Chilia,

>>>>> Could we use VS2008 within Framework 2.0/3.0??

Yes - you can use the "multi-targetting" feature to use VS 2008 to target .NET 2.0/3.0.  Here is a blog post I've done that covers how this works: weblogs.asp.net/.../vs-2008-multi-targeting-support.aspx

Hope this helps,

Scott

# re: VS 2008 JavaScript Debugging

Wednesday, July 25, 2007 3:30 AM by PerOnn

Hi Scott,

In an earlier reply you commented on the posibilitys of having one developer working with VS 2008 beta 2 and others in the same project working with VS 2005. I'm wondering if you could elaborate more on this. We have a project with to developers and we are using Source Safe.

I think i understand that the project files work as long as I copy the targets file but I'm not sure about the solution files. How can I have two solution files in the same solution (one for VS2008 and one for VS2005)? Is that possible and can they be checked in both to Source Safe so that anyone using VS2008 beta 2 can open the solution with that file and those using VS2005 can open the same solution but with that file?

Hope I make sense because I would really like to start testing VS2008 in a real project.

Best regards

Per

# re: VS 2008 JavaScript Debugging

Wednesday, July 25, 2007 5:26 PM by Sambhav

I had this project(posted on my webpage) which required some javascript skills. And I thought that my best friend Visual Studio will again help me to move things fast. But to my disappointment VS.net 2005 had little support for javascript debugging. Nevertheless, i completed the project and now i am excited to know that VS 2008 will finally have JavaScript debugging support.

Kudos to the VS developer team !!

# VS 2008 and .NET 3.5 Beta 2 Released

Thursday, July 26, 2007 5:33 PM by Blogs

I'm very pleased to announce that the Beta 2 release of VS 2008 and .NET 3.5 Beta2 is now available

# VS 2008 JavaScript のデバッグ

Wednesday, August 01, 2007 6:02 PM by Chica's Blog

VS 2008 JavaScript のデバッグ

# re: VS 2008 JavaScript Debugging

Sunday, August 19, 2007 11:24 AM by David Parslow

Scott,

Does "Script Documents" replace the Script Explorer Debug Window?  I have to thank you for making the script document show up by default when debuging client script as I just got done bloging about how many people don't even release the Script Explorer window is even there because it is burried two level deep and seperate from half of the other windows in the View menu.

Has there been any take with the IE team about integrating the script debugger into the Internet Explorer Development Toolbar like FireBug for Firefox has an integrated debugger?

# Using ASP.NET AJAX Control Extenders in VS 2008

Monday, August 20, 2007 12:58 AM by ScottGu's Blog

Over the last few weeks I've blogged about the new VS 2008 JavaScript Intellisense and VS 2008 JavaScript

# re: VS 2008 JavaScript Debugging

Monday, August 20, 2007 2:01 AM by ScottGu

Hi David,

>>>>>> Does "Script Documents" replace the Script Explorer Debug Window?  I have to thank you for making the script document show up by default when debuging client script as I just got done bloging about how many people don't even release the Script Explorer window is even there because it is burried two level deep and seperate from half of the other windows in the View menu.

Yes - you can logically think of this new window as a replacement for the old script explorer debug window.  Now it is easy to find. :-)

>>>>>> Has there been any take with the IE team about integrating the script debugger into the Internet Explorer Development Toolbar like FireBug for Firefox has an integrated debugger?

Yes - the IE team is looking at this now for their IE Developer Toolbar.

Thanks,

Scott

# re: VS 2008 JavaScript Debugging

Thursday, September 13, 2007 2:13 PM by Alex Lee

How do I debug ASP page with Javascript?

# MSDN Blog Postings » Debugging and Profiling Features in VS 2008

Pingback from  MSDN Blog Postings  » Debugging and Profiling Features in VS 2008

# Visual Studio Team System 2008 ships!

Monday, November 19, 2007 12:15 PM by Jeff Beehler's Blog

What else can I say? The big day has arrived (read the official word here on Soma's blog ) and we're

# Visual Studio Team System 2008

Tuesday, December 04, 2007 4:02 PM by Yo sólo pasaba por aquí pero ya que estoy....

Como muchos ya sabréis hace poco Microsoft lanzó al mercado Visual Studio 2008. Si estáis

# VS2008对Javascript调试的增强

Friday, January 25, 2008 12:10 AM by shore

在上一篇blog中我们说到vs2008对Javascript智能感应的增强,现在我们来看vs2008对于调试javascript有哪此功能。

ScottGu已经非常清楚的描述了这个特性,VS200...

# Getting .NET Framework 3.5 and VS2008 Adopted

Saturday, March 08, 2008 2:20 AM by From the software development trenches

I'm currently trying to pro-actively drive the adoption of the .NET Framework 3.5 and VS 2008 within

# Novedades en Visual Studio Team System 2008

Sunday, March 09, 2008 5:45 PM by cross-posting de geeks.ms

Como muchos ya sabréis hace poco Microsoft lanzó al mercado Visual Studio 2008. Si estáis interesados