Bug Babble

Bugs, debuggers, stuff

Browse by Tags

Tagged Content List
  • Blog Post: Simple VS Addin (updated)

    Back during the PDC for Whidbey I wrote a post about Creating a Simple Addin . Recently I was looking to update it and found a horrible bug in it. First, here is the corrected code: public void OnConnection( object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) {...
  • Blog Post: Naming threads in Win32 And .Net

    When you are debugging an application with multiple threads it can be handy to have a better name than just the thread id. This is simple to do in managed code. There is a property on the Thread object that you can set. It is also possible to do this for native code. However, there is simply no way you...
  • Blog Post: FuncEvil, the Clipboard, and Deadlocks

    Mike Stall has a great post that, for a debugger dev, is the moral equivalent of sticking a fork in a toaster. The basic problem he addresses is that once you are stopped in the debugger the UI for your application will no longer paint. What if you need to see something on that UI? If you like to live...
  • Blog Post: Change Debugger behavior with Attributes

    Certain metadata attributes modify the stepping, breakpoint, and callstack behavior of the VS managed Debugger. This is useful if you are creating an interpreter, language runtime, or a tool that modifies the code in a managed assembly. There are three flavors of these attributes that affect execution...
  • Blog Post: Netmodules: Sort of like a lib

    I first ran into netmodules before VS 2002 was shipped. The netmodule gave me precisely what I asked for, without actually solving my problem. I wanted to use multiple languages (C#, and C++ /clr) in a single assembly. It turns out a single assembly can be multi-module. Multi-module means a single .Net...
  • Blog Post: XSLT debugging in Visual Studio

    Visual Studio is a big tool. It's easy to miss some useful features. Hopefully t he XSLT debugger won't get missed. If you want to learn how to use XSLT debugging take a look at Neetu Rajpal's msdn article Introducing Xml tools in VS 2005 . Below you can see the debugger in action as an xslt transform...
  • Blog Post: Perf Awareness is not Premature

    I've found myself adding a timer to each of the unit test frameworks I use so I can see how long my tests take. I am not trying to do anything complex. I just want to be aware of the perf. The same way pass and fail are visible, 1ms vs 90ms is visible. Premature optimization rightly has a bad rep...
  • Blog Post: Checking the result of new is a bug in C++

    At least, it is a bug in VC8. That check won't happen. Reading Larry Osterman's recent posts "What's wrong with this code, part 15" and the answers , reminded me this behavior changed in VC8. If you check the result of new in code compiled with VC8, your code is wrong. The call to new will throw. Yes...
  • Blog Post: PsuedoVariables and Format Specifiers

    The VS debugger has a history of tiny but useful features hidden in the expression evaluator. These features are like the yellow shirted ensign in star trek. They are useful, but unknown and expendable. Developer's learn about them by attending a Power Debugging talk, or buying one of John Robbins very...
  • Blog Post: $env=0

    Winning the award for the least understandable UI metaphor: the ability to view the environment variables in the target when native debugging. This is yet another tiny undocumented feature of the native expression evaluator in VS. $env falls under the same extravagant disclaimer from the @clk post ....
  • Blog Post: Assembly language survival guide (for Debugging ... not writing)

    Knowing just enough assembly is a really powerful aid in Debugging. These are short articles that hit the sweet spot of enough information to be very useful, but not so much that it is a chore to learn: Matt's Just Enough Assembly Language to Get By: http://www.microsoft.com/msj/0298/hood0298...
  • Blog Post: Devenv stealth feature, Poor Man's Profiler

    This feature is unsupported. It is undocumented. If you call help desk about it nice people will say “huh?” If it breaks, people will nod knowingly and say “I told you so”. In later versions it may simply disappear. It could decay right now as I speak and explode! (maybe not.) One more disclaimer...
  • Blog Post: Edit & Continue trick for Conditional Bps

    Using Edit and Continue to fix a bug is handy, but don't wait until you've found the bug to start editing. One powerful technique is to use E&C when you are still trying to find the problem. Edit and Continue allows you to make any conditional bp into a normal bp. This is useful for two reasons....
  • Blog Post: Is there such a thing as a good bug?

    I was dreaming last night that Shai and I were cleaning an old apartment, when a hockey puck sized bug crawled onto Shai's hand. In real life there would have been screaming. In the dream she lifted it up so we could both look at it. I am not an entomologist, but I'd be surprised if this was a real...
  • Blog Post: Random Repros

    Adi Oltean continues a great series of blogs about supportability, with this one about Random Repros . Stop reading this. Go read that. And reply in his comments, if you have any ideas nearly as good as his. There are a couple of reason tough bugs are hard. The most common reason is the repro is too...
  • Blog Post: This is not the bug you are looking for.

    Some flaws cause what I call the 'quick exit' feature. This is where the app just disappears. No watson dialog intrudes into the streamlined experience of a sudden lack of your application. Losing unsaved work isn't appreciated by users, and the lack of watson means we are less likely to know the...
  • Blog Post: What's you're favorite Infinite Loop bug?

    The best feature of my dual proc machine is the ability to kill off bad processes that attempt to spike the cpu. When a process goes crazy on the dual proc, the machine becomes slightly sluggish. Checking taskman tends to show a process hovering at exactly 50% cpu usage. A single threaded app (or 1 thread...
  • Blog Post: Use the symbol server

    Below you see the sad state of affairs that comes from not using the public symbol server: This is not the callstack you want to see. With only exports loaded for ntdll.dll you are missing the whole show. What you need is the public symbol server! (Don't bother clicking on this link, use this URL...
  • Blog Post: Beeping Robots and Bug Stories

    Do you have a bug story? Everyone has stories of being affected by bugs. However the stories from software folks are fascinating because the annoyance of the bug is atmosphere rather than the whole story. Here it is about defeating the bug, or uncovering the bug, or sometimes it is about being the infamous...
  • Blog Post: Is this obvious?

    using System; using System.Collections.Generic; class LearnTheMaterialsYouWillUse { static void Main ( string [] IsThisObvious) { TimeSpan passesBeforeYouKnowIt; DoYouNodeThis aBigOlTree = new DoYouNodeThis(21); passesBeforeYouKnowIt = TimeIteration(aBigOlTree.InOrder1(...
  • Blog Post: Trying out TDD

    I started developing a hobby project at home to try using TDD. I pretty quickly came to an issue. The app needs to store and update information in the ApplicationData directory. I want to unit test this functionality, but I don't want it mucking with my files on disk from when I last used the app. ...
  • Blog Post: The Debugger is useless.

    Cyrus says he doesn't need a debugger when developing managed code. He is not advocating using printf here. He is claiming that with TDD (Test Driven Development) most of his bugs can be resolved by "sitting and mulling on it" and having a "gestalt flash". I half believe this. I expect that using...
  • Blog Post: Left Side, Right Side

    Never refer to two software components as 'The Left Side' and 'The Right Side'. The name will stick, and resist any attempt at change. The underlying debugging componets for the CLR are loaded into both the debugger and the debuggee. I remember which is which by thinking about how it should be named...
  • Blog Post: Unmanaged Debugging vs. Managed Debugging vs. Mixed Debugging.

    All versions of VS support debugging both managed and unmanaged code. However there is a big difference between doing one or the other and doing both. GreggM has written about some of the reasons interop debugging is difficult . Here I will refer to debugging both managed and unmanaged at the same time...
  • Blog Post: Debugging as thrill sport

    Gregg is normally a pretty calm guy. However, he was jumping up in down in front of my office after figuring this out: Debugging into DCOM process creation . I like this statement that gets to the heart of how all problems are actually solved: “ Step #9: Jump to a conclusion that turned out to be...
Page 1 of 2 (28 items) 12