You are browsing the archive for Debugging.

by Editor

KB2650605 QFE : VS2010 sp1 VB web form editor may not become editable during debugging

January 31, 2012 in Articles, News, Reference

We recently released a VS2010 sp1 QFE KB2650605 to solve a VB editor debugging problem. During VB web form debugging, VB web form may become un-editable if there are server tags inside. If you develop and debug VB web forms, you might be interested to download this QFE. http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=40811 Best regards, Xinyang Qiu Web Platforms and Tools Team Read More……(read more)

by Editor

Working with the $(this) object in jQuery

May 24, 2011 in Articles, News, Reference

I’m working on an HTML application. It’s a Workout Timer and will become an HTML5 experiment that is “desktop deployable” and will store user profiles using HTML5 local storage, etc. Though the application is in the very early stages, I know where I’m going and I want everything to be highly configurable, and for those [...] Read More……(read more)

by Editor

.NET Memory Leak: XslCompiledTransform and “leaked” dynamic assemblies

May 5, 2010 in Articles, ASP.NET, News, Reference

I have written before about high memory usage caused by improper usage of XmlSerializer objects both in a case study and in a debugging lab .  The problem there was that every time you create a new XmlSerializer object with a non-default constructor, you generate a new dynamic assembly that contains the definition and methods for the serializer.  Since assemblies can’t be unloaded from a process unless the application domain they are loaded in is unloaded memory will keep increasing if you create new XmlSerializer objects until eventually you end up with a System.OutOfMemoryException. In the case of the XmlSerializer dynamic assemblies, they are quite easy to spot as you can look at meta-data (see previous posts) and figure out that…(read more)

by Editor

New Visual Studio 2010 and .NET 4 debugging content

April 28, 2010 in Articles, ASP.NET, News, Reference

It’s been a pretty busy few weeks at work coupled with some vacation so I’ve been lagging a bit with the blogging, so sorry for bombarding the blog with new posts now:) As you all know, Visual Studio 2010 just released and there is a lot of new content out there and I thought I’d mention a few in the debugging/troubleshooting space. ScottGu wrote a post on the VS 2010 debugger improvements as part of his VS 2010 and .NET 4 post series where he talks about news with Data Tips and Breakpoints. The Visual Studio Profiler Team Blog has a lot of posts worth reading about profiling in VS 2010 , including Silverlight Profiling and guidance for profiling. Steve released a new version of SOSex.dll with features that work for both 2.0 and 4.0 John Robbins…(read more)

by Editor

Debugging a classic ReaderWriterLock deadlock with SOSex.dll

April 27, 2010 in Articles, ASP.NET, News, Reference

I was helping out on an issue the other day where the process would stall if they added enough users in their load tests.  Btw, serious kudos to them for making load tests, so much nicer to work with a problem in test rather than when it is getting critical on a production machine. We gathered some memory dumps with debug diag of the asp.net process (w3wp.exe) and found that most of the threads were waiting in this type of callstack:  NOTE:  I have changed a lot of function names and code snippets since it is not relevant for the post. 0:071> !clrstack OS Thread Id: 0x21ac (71) ESP       EIP     1c8ceb88 7c8285ec [HelperMethodFrame_1OBJ: 1c8ceb88] System.Threading.ReaderWriterLock…(read more)

by Editor

New Psscor2 commands – Dealing with Dates and Times

April 22, 2010 in .NET, Articles, ASP.NET, News, Reference

If you have ever tried to look at a System.DateTime or System.TimeSpan object in a debugger, you know how difficult it is to see what the value is.  For example, this is what a System.DateTime object looks like: 0:017> !do 0x040f59b8 Name: System.DateTime MethodTable: 60809f0c EEClass: 605e1fd8 Size: 16(0×10) bytes GC Generation: 2 (C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll) Fields: MT Field Offset Type VT Attr Value Name 6080ab9c 40000f4 4 System.UInt64 1 instance 633739266270770000 dateData 6082aa5c 40000f0 30 System.Int32[] 0 shared static DaysToMonth365 >> Domain:Value 0097ce58:03d6cad0 << 6082aa5c 40000f1 34 System.Int32[] 0 shared static DaysToMonth366 >> Domain:Value 0097ce58…(read more)

by Editor

New Psscor2 commands – ClrStack showing source and line numbers

April 12, 2010 in .NET, Articles, ASP.NET, News, Reference

Continuing on from my previous post about DumpAllExceptions , here is another new update that comes with psscor2.  When you run !clrstack, you will now see the source and line information for the functions that are displayed.  This can be really helpful when trying to track down where a problem is and what path through your code this execution has taken. You don’t have to do anything to make this output display, it will automatically at the end of the line. The output will look something like: 02b9ef98 687db33a MyFile.DoWork(System.Web.HttpContext) c:\MyFile.cs:3710 .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space…(read more)

by Editor

New Psscor2 commands – DumpAllExceptions

March 30, 2010 in .NET, Articles, ASP.NET, News, Reference

There have been a few places where you can see this command run, but I wanted to talk about it here officially.  This command is used to display all of the exceptions that are currently in the managed heap.  One interesting thing is that this function actually looks at what class the object derives from and if it derives from System.Exception, then it will show up in the list.  So you can have your own custom exceptions shown here regardless of what naming mechanism you use for your class. There is some helpful information about the output from this command here: ASP.NET Debugging – ASP.NET Tips- DumpAllExceptions , namely that if you run it twice, you may see different callstacks from the various exceptions. Here is the documentation…(read more)

by Editor

New debugger extension for .NET (PSSCOR2)

March 30, 2010 in Articles, ASP.NET, News, Reference

Tom just blogged about a new debugger extension called PSSCor2, which is a superset to the SOS.dll extension that ships with the .net framework. PSSCor2.dll has been around for quite some time at Microsoft, and pretty much everyone debugging .net code with windbg within Microsoft is using this since it contains all the goodness of sos.dll plus a lot of special methods for asp.net and other technologies running on top of the .net framework.  The news now is that after a lot of hard work by Tom and Jon Langdon in the CLR team, it is finally released publicly, YAY!!! You can download it here and Tom promised to write some posts about the new commands so you might want to follow that… I will likely do the same later on as well… Just to name…(read more)

by Editor

New debugger extension for .NET, Psscor2, released

March 29, 2010 in .NET, Articles, ASP.NET, News, Reference

I wanted to be the first to inform everyone that there is a major update to the debugger extension story for .NET.  Psscor2 has been released!  This is a superset of the SOS.dll that ships with the framework. This extension has a lot of advantages over SOS if you are trying to troubleshoot problems, especially if they are caused by ASP.NET.  All of the functionality that has been talked about on this blog for the SOS that comes with the debugger is now available for .NET Framework 2.0, 3.0, and 3.5. This one extension will troubleshoot all of those versions. I will be getting into the new commands and talking more about this in the coming weeks.  But I wanted to let everyone know and have you all go download the extension…(read more)