Tag | Debugging Posts

Scott Guthrie[MSFT] announced the availability of .NET fx 3.5 library source code as promised. (Setup and how to use) Quote from the announcement: Specifically, you can now browse and debug the source code for the following .NET Framework libraries: .NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, ...
Scott Hanselman beat me to the punch, but come Feb 14th, our latest and greatest edition of the Professional ASP.NET book is coming out. The book has a ton of new content and was exciting to put together - but man, did it take some serious time to do (especially when all three of us have real jobs, kids, newborns, animals, etc to deal with). The book is big ... really BIG - 1728 pages, so it can serve many other useful purposes after you are done reading it! :) The book description from the WROX.com ...
This article is a Part 3 of the Interview Questions series. Part 1: BizTalk: Questions for interview without answers Part 2: BizTalk: Interview questions and principles Part 3: WCF: Questions for studying and interviewPart 4: WCF: Questions for studying and interview: DiscoveryPart 5: WCF: Questions for studying and interview: Routing Service Part 6: BizTalk: Advanced Questions Additions (2008-06-18): Debugging: What tools are used for the debugging WCF? Is it possible to log the messages on the ...
Stack walking is second nature to debuggers. But if you had more interest in it than just debugging and either: wanted to know what stack walking is about, or wanted to know how stack walking is implemented, or wanted to know how a custom stack walker can be authored for your application then you might find the article, Authoring a Stack Walker for X86, useful. Its my attempt to help clarify the basics of stack walking and explain key concepts and show how it can be implemented on x86 platform. The ...
I have generally avoided the databound controls provided by the .NET framework. I am referring specifically to controls such as the GridView. Oh don't get me wrong, I use the GridView like I use oxygen. I just don't use an associated DataSource control. Utlimately, therefore, I manually bind controls to data. There are three main reasons I have opted to avoid databound Distributed Applications - Most of the business applications I design incorporate a business layer so it is rare that I bind directly ...
With ASP.NET, we have a bunch of different ways to store data that we want to persist across postbacks: values in session, querystring, viewstate, cookies, etc. One thing that I'm very adamant about is ensuring that these values are enforced with strong typing. Without strong typing, you end up doing a few things: 1. You open yourself up to errors because of typos in the variable names or in duplicate names with differing uses. This one speaks for itself. Because most of the storage methods allow ...
First of two-parts of Cream I've found in my blog-reading: Koen of FirsFloor demonstrates a Slideshow of Picasa WebAlbums, Michael Cameron takes 2D collisions into 3D, Jesse Liberty's first 4 "Did You Know" posts, Bret Ahlstrom discusses the Blend SP1 Update, and Pete Brown in a podcast about Silverlight and the Carbon Calculator application. From SilverlightCream.com: How to integrate Slideshow with the Picasa WebAlbum API Koen of FirstFloor shows how he integrated his very nice Slideshow with Picasa ...
I'm teaching an ASP.NET course for a local university's continuing education department, and its going really well. One thing I introduced yesterday was the idea of paired programming for going through in-class examples and exercises and it worked out very well! It was interesting to see paired programming in action, even if it was a microcosm for what goes on in the real world. The students didn't mind either, and it actually sparked more discussion about how to structure certain code pieces or ...
Ive been developing a few custom adapters for a project recently. Actually one of the adapters was the .net file adapter from the BizTalk SDK samples which we wanted to use and include in our deployment. The aim was as follows: Create the functional code for the adapters Create unit tests to cover as much of the functional code as possible Create a sample BizTalk application to allow demonstration and further testing of the adapters Create BizUnit tests to test the adapters within a BizTalk application ...
Here below is a collection of articles from this blog which seemed to have interested (and benefited) many folks and I thought of sharing the links and the respective topics. Error: allowDefiniton='MachineToAp... - Not configuring a folder as application before using application level settings. http://geekswithblogs.net/r... Dynamically assigning the URL for an Iframe in ASP.NET http://geekswithblogs.net/r... Parser Error: Could ...
When you want to debug your own written Windows Service, you have to install the service on your local machine and attach the Visual Studio 2005 debugger to the process. There is an easy way to start (and test) the windows service within Visual Studio 2005. 1) Add a public method to your windows service class to invoke the protected OnStart : public void OnStart() { this.OnStart(null); } 2) Add a new class to your windows service project public class Entry { static void Main() { #if DEBUG MediationService ...
I've just finished reading asp.net Ajax in action by Alessandro Gallo, David Barkol and Rama Krishna Vavilala. ISBN-10: 1933988142 My philosophy about javascript can be summed up in one word "yuk!" I keep hoping that the need to learn javascript will pass as the tools catch up and extend the .net dev environment to the browser client. This is happening with much better tools for debugging and deploying javascript in vs 2008. Still i'm a curious person and am embarrased to admit how little javascript ...
I was trying to sovle a sticky problem involving someone else's assemblies but not getting very far -- I needed more information such as line numbers. Usually when you invoke a .NET assembly from BizTalk you need to put it in the GAC and this means you are deprived of the symbols (PDB) which would normally sit beside the assembly in the file system. There are some good posts out there but they seem to relate to .Net 1.0 so they didn't quite work. Here's what you do: You can copy the PDB files directly ...
I found these great links in scott bolg while searching for anyways to speed up Visual Studio 2005 Performance. http://weblogs.asp.net/scot... Tip/Trick: Optimizing ASP.NET 2.0 Web Project Build Performance with Visual Studio 2005 Public Hotfix Patch Available for VS 2005 F5 Debugging Performance Issue with ASP.NET Speed up Visual Studio 2005 Optimize the Launch of Visual Studio 2005 Thanks scottgu ...
Scott Guthrie gave a great keynote this morning. As is turns out VS 2008 is almost complete and we are not getting a copy here at the conference. We will get one mailed to us however after they release it. Which means we will not really be one of the first to get it. :( Visual Studio 2008 - Of course this is going to be able to be used immediately by us due to the fact that you can target .NET Framework 2.0. That means we can just install and continue developing the same applications with AJAX integration ...
For the last few years, I've tried to make more .NET developers aware of the IDisposable interface, the Dispose pattern, and the importance of having at least a basic understanding of how the Garbage Collector works. I have one article on The Code Project and various blog posts (see here, here, here, or here) that talk about these topics. I have also presented an advanced Memory Management presentation at various Code Camps. In the November 2007 issue of MSDN Magazine, Stephen Toub presents a solution ...
It is quite common, that a developer needs to do a few (sometimes time-consuming) steps to navigate to the pages that are required debugging. And if you do some non-trivial change, Edit&Continue doesn't work, and you have to start debugging again. Yes, I know, that small unit tests should cover all the code paths and make debugging redundant. Unfortunately in the real life debugging is sometimes unavoidable. Watin Test Recorder allows to record the navigation steps and save it as a console executable(or ...
I am back to blogging after a vacation..! This time I had an issue with TFS Alert not working properly. You need to make sure that you have done the following setting properly: C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\Web.config <add key="emailNotificationFromA... value="TFSAdmin@Company.com" /> <add key="smtpServer" value="ExchangeServerName" /> Now you need to reset IIS or recycle the pool that "Services" application is linked with. ...
Recently I worked for the first time with CData sections in XML messages. A CData section in an XML Document starts with <![CDATA[ and ends with ]]> and everything between is ignored by the XML parser. In my scenario I got xml (with some CData sections) from a WebService, transformed it with a map (and did some other things in an orchestration) and sent it to another WebService. The first WS gave me xml with CData but the second WS received none. After some debugging I found out that the xml ...
I received an error that said, "Line 1: Syntax Error." I kept debugging the error, but I didn't think the document definition was causing the error. In the end, I found another developer on the project, had an onmouseover event getting set into a div on via the innerhtml property that included something like onmouseover='somefunction(s... It wasn't quite that simple, but essentially it was too long to find. Unfortunately, the debugging isn't what it should be and the ...
I'm sure most of you are familiar with Reflector. If you're not you should download it immediately and become familiar with it. It is an invaluable tool for looking at .NET assemblies and decompiling them to C#, Visual Basic or even IL. I have used both Reflector and Rotor extensively to investigate how the .NET runtime is actually doing things. I have done this for various reasons, including trying to track down bugs in my code. Why would I need to look at what the runtime is doing to find a bug ...
Check this out at Scotts Blog: source: http://weblogs.asp.net/scot... Releasing the Source Code for the .NET Framework Libraries One of the things my team has been working to enable has been the ability for .NET developers to download and browse the source code of the .NET Framework libraries, and to easily enable debugging support in them. Today I'm excited to announce that we'll be providing this with the .NET 3.5 ...
As you may have heard, Scott Guthrie announced today that they will be releasing the source for the .net framework and that you'll have debugging capabilities inside of VS 2008. You'll actually be able to step into the .net source and see what's going on. This is cool! I'm sure it'll also be a big boost for Mono: "Just how exactly are they writing that code?" How much of the runtime will then be "borrowed" for open source projects? Very good announcement ...
Overview Based on experience, as well an industry acceptance that development teams are construction driven and are always less focused to Software Process. This has been identified and henceforth the inspiration behind the proposed architecture, as a remedy, by keeping build management beyond developer’s domain. Modern configuration environment is getting complex due to rising nature of applications to be distributed whereby they are dependent on their functionality on other applications. Such scenarios ...
improve :my => 'code' I will be posting code examples soon.. But you may not need to wait for my examples to get started as it has really simplified JavaScript development for many. Several lines of code can be written in line most of the time using this library. Here's the link... http://jquery.com/ When you get there, please be sure to check out the many plugins that are available there. (BTW, I have been impressed by Script # from Mr Softie as well... It allows you to write debuggable .NET ...
Jesse Liberty discusses Dependency Properties or is it Attched Properties ? and an older article by Peter Kellner on Debugging in Silverlight 1.1 and Web Services From SilverlightCream.com: Dependency Properties or Attached Properties Jesse Liberty takes a swipe at naming conventions, but in an amongst the text is some good xaml knowledge Integrating Web Services and Silverlight including Debugging Peter Kellner discusses debugging around in a Silverlight 1.1/Web Services application. Stay in the ...
For a long time I have been a big fun of MFC template collections like CArray. The main reason was that they were easy to use and what’s most important quite easy to read in debugger what’s inside them, yet in many places I use mostly STL to take benefit of various collection types and available algorithms. Debugging with STL never was easy, VS 2005 out of the box supports auto expanding of its own STL containers, if you use other implementation than the Microsoft’s one, you have to write your own ...
During my talk on Garbage Collection in .NET at the Jacksonville Code Camp 2007, Joe Healy mentioned that I should take a look at the changes made to the GC in the .NET Framework 3.5 release. (This is based on the Beta 2 release, but it should be pretty stable at this point.) After doing some research using the SSCLI 2.0 code base to look at the GC class as it exists in .NET 2.0 and Reflector to look at it in .NET 3.5, I found the single change that was made. (For those of you wondering why I used ...
Today I had an issue where an application that as a mixture of .NET, VB6 and C++ code needed to be debugged. Since the component that I needed to look at was in the VB 6 portion, I attempted to debug from VB6 only to be met with a variety of bizarre errors. I don't have visibility into the rest of the application, so I continued with the .NET 2005 debugging session, which executed correctly, and noticed that I could set a breakpoint in the VB 6 code when the unmanaged debugging support was turned ...

While debugging a COM Interop error I came across the fact that Binding Failures can now be trapped in the IDE using the BindingFailurse MDA (Managed Debugging Assistant).  Up until today, I'd still been using the FUSLOGVW utility to track down binding failures.

Experiences today have made me realize how important a solid build process is.  I spent 6 hours today trying to get a development environment in a virtual machine to build the source to a component that I needed to help debug.  The actual debugging session has taken less than five minutes and will probably take only about another 30 minutes tomorrow.

This is a great post that anyone who works with WinDbg should check out:

http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx

Bookmark it - it will come in handy anytime you're debugging with WinDbg.
I've recently started learning Workflow Foundation in conjunction with Sharepoint Server 2007. One particularly annoying issue I have with it is the development setup needed: its kinda designed to only work on Windows Server 2003. What I mean by this is that some sdks don't install at all on other OSes (like the OfficeServerSDK or the Windows SharePoint Services 3.0 Tools: Visual Studio Extensions), while others do install, they even install the Sharepoint workflow project templates in Visual Studio, ...
The main purpose of writing this is to show how debugging is easy. Orchestration debugging is possible through Health and Activity Tracking (HAT) tool. By the help HAT you can easily debug any active or dehydrated orchestration. Once an instance of an orchestration executes and encounters one of these breakpoints, it will go into a wait state in the BizTalk MessageBox, allowing a developer or administrator to manually step through the orchestration. Run BizTalk application at least one time and then ...
I have quite complicated class and I wanted during debugging/testing to validate that the data in the class is consistent. So I created a method Validate and used it in unit testing class MyComplexClass oClass= MyComplexClass.CreateClass(); Assert.IsTrue(Validate(oCla... But then I understood, that it would be better to call this function in the code to ensure that validation happens in the application, not only in unit testing. So I've added Validate method to the end of my CreateClass() method ...
Visual WebGui is the .net answer for GWT (Google Web Toolkit). But it’s seems more powerful than GWT even though it’s not coming from Microsoft and yet it’s open source. Still I hadn’t got time to put my hands on deeply but you can feel it by just browsing their web site and checking the features and comparing those with GWT. Not like GWT, in Visual WebGui you can use existing windows controls to create your UI. Major advantage of Visual WebGui over GWT is we can deploy Visual WebGui applications ...
I've had a code similar to the following: string sSql = String.Format("Column1 LIKE '%{0}%'", StringValue); fareRows = dataset.Table.Select(sSql); And DataTable.Select method returned me "Cannot perform 'Like' operation on System.Int64 and System.String". System.Data.EvaluateException: Cannot perform 'Like' operation on System.Int64 and System.String. at System.Data.BinaryNode.SetT... op, Type left, Type right) at System.Data.LikeNode.Eval(D... row, DataRowVersion version) at ...
The Problem: If you have been using Vista for a while like me, and you get into situations beyond the capabilities provided in ASP.NET development server (simply like virtual directories), and had to load your development in IIS7, you must have had at least 3 or 4 times of problems with debugging (or simply hitting F5) not working at all. Some of the solutions were creating the website application/v dir yourself not using Visual Studio (This applies to Website model more than Web Application Project ...
Well, I gave my first team presentation today as part of my "Being a Better Developer" goals. Today's topic was "A Refresher Course on Debugging" and you can read the article I wrote for the topic if you follow that link. The article was based on (i.e. copied from) one of the best debugging articles I have ever read. You can read the original and much more in depth article on debugging here (warning, it has a game development focus, but is still applicable to most developers). The presentation itself ...
Debug your code at a Silverlight Lab in Redmond, and new Blend Quickstart on Silverlight.net Come to a Silverlight Lab in Redmond Not busy July 23rd - July 25th and in the Redmond area? Bring your Silverlight project along and bang on the door... they'll even throw in a visit to the company store... free debugging help, low prices at the company store, cool weather ! Silverlight QuickStart Using Microsoft Expression Blend Wow... this is cool... get familiar with the 1.0 QuickStart... then do this ...
This article is a Part 2 of the Interview Questions series. Part 1: BizTalk: Questions for interview without answers Part 2: BizTalk: Interview questions and principles Part 3: WCF: Questions for studying and interviewPart 4: WCF: Questions for studying and interview: DiscoveryPart 5: WCF: Questions for studying and interview: Routing Service Part 6: BizTalk: Advanced Questions This is the questions for a BizTalk developer position during a technical interview.Interview can be very intensive and ...
I work almost only with code written by predecessors at my job. There's good code and bad code. Recently, I've been trying to clean up the exceptions. Just about everything is throw Exception(<my message here>) instead of customized exceptions, so you never really know what you're catching. It could be an IO exception, a null pointer, or whatever. The message is generally something that can be displayed to the user without them becoming confused, but with a mix of "good" message exceptions ...
Okay, so I am back with another rendition of things I should have learned in Kindergarten, but must have been absent that day. J Thursday of last week , we had a team site owner cleaning up a her team site getting rid of things that were no longer needed and lists that were no longer used. Well, it just so happens she executed a click path that sent about 23 of her 78 sites in to the ether and whenever she or her teammates tried to access the sites they would get a plain SharePoint "500 – Internal ...
Microsoft providers two Workflow development tool for Windows SharePoint Services. First one is Visual Studio 2005 Extension Second one is Office SharePoint Designer 2007 Visual Studio 2005 Office SharePoint Designer 2007 Visual Studio 2005 Designer for Windows Workflow Foundation Office SharePoint Designer 2007 Can write workflows for Microsoft Windows SharePoint Services 3.0 Can write workflows for Microsoft Windows SharePoint Services 3.0 Code-behind file enables developer to write custom Microsoft ...
The other day I stumbled over a non intuitive feature of localization. Turns out that you need to include any key you are going to use in a local specific file in the culture neutral file as well. Otherwise - declarative control localization using the meta:resourcekey="myKey" property syntax would not work as expected.. The setup: Create a file named Default.aspx Create an asp:HyperLink tag, and set some properties:<asp:HyperLink ID="Greetings" runat="server" Text="Hello World" NavigateUrl="http://www.Rea... ...
I'm posting this blog mostly to remind myself how to fix this if ever I run into it again, but if anyone else benefits from it, then awesome. In the Visual Studio IDE, when I set a breakpoint at a line of code, and start debugging, the breakpoint becomes that hollow maroon circle with a warning that says The breakpoint will not currently be hit. No symbols have been loaded for this document. I've read a bunch of articles about makiing sure you're running in debug versus release mode, and making sure ...
So far we have a contract, 2 client/server pairs (one programmatic and one administrative). We can observe that the highly difficult tasks of text concatenation and changing case are happening. But these examples are extremely trivial, and as we increase complexity, try new things, it would be nice to observer what is going on, especially when it does not go well. Luck for us, there is a built in logging facility in .NET and a complete feature set and viewing tool specifically for WCF. And all can ...
I typically enjoy debugging. I think most developers do. We seem to be hard wired for puzzle solving. I don't enjoy debugging cryptic errors or untruthful errors. Today, I've spent all my time trying to figure this gem out: C:\dev\test.proj (227,5): error MSB4061: The "StarTeamCheckout" task could not be instantiated from the assembly "C:\Program Files\MSBuild\MSBuildCommun... System.IO.FileNotFoundExcep... Could not load file or assembly 'Interop.StarTeam, Version=1.0.0.0, ...
Last couple of weeks I was really busy with some R&D works on Google Web Toolkit (GWT). May be you already know GWT is an open source software development framework for creating Ajax enabled web applications like Gmail. Wonderful thing about GWT is may be you don’t have any knowledge about Ajax or in depth knowledge in java script but yet you can develop very advanced Ajax enabled applications. So if you have a web application project and a team of java developers who don’t know much about web ...
Today marks the start of my journey to becoming a better developer. I am telling you all about it so that I can be held accountable for things I am about to say. I did not want to over think this but I did want to do things that challenged me as a developer on a variety of level. This is the current list of 6 months goals. I will not remove anything from this list, but I may add to it as I begin this journey to improve as a developer. I will read 1 technical book every month for the next 6 months. ...