On an ASP.Net page that uses an UpdatePanel containing various validated controls for partial postbacks, the Visual Studio 2010 script debugger window starts to show an ever growing list of "Script Block" entries which appear to be anonymous our auto-generated functions related to the controls on the panel as it is reloaded. It appears that old script blocks from previous times the panel was updated are not disposed so the list just keeps on growing, slowing down the page and the debugger, until IE is closed whereupon it can take a long time to delete the hundreds of blocks that have appeared.
Is this a problem with the way the page is operating or an artifact of the debugger? Comparing performance of the debugged and non-debugged page it appears to be the latter, but it would be good to know what is going on and why.
Well Well here is your answer.
http://vishaljoshi.blogspot.com/2009/06/disabling-script-debugging-with-vs-2010.html
Basically when you debug through VS2008/2010, IE8 and forward, script debugging will be enabled automatically. Which is criticized by many. However there are few workarounds.
First one is in above article which tells you to enable Silverlight debugging and tells you path for both Projects as well Websites, where to go and how to enable it.
Once you enable silverlight debugging JS debugging is turned off as both can't run side by side.
Drawback (if you really think it is ): Silverlight tools for VS need to installed
Start the application without debugging (CTRL + F5) once app running attach debugger manually by clicking on Debug->Attach to Process.
For VS 2008 there are several alternatives like editing registry keys and so forth.
If anyone need VS 2008 help regarding that check this out. http://blogs.msdn.com/b/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With