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: Edit and Continue on 64 bit Windows

    Pascal writes about the joy of x64 Windows XP, and some drawbacks. One drawback is no Edit and Continue using the 64 bit CLR. You can, however, use E&C against the 32 bit CLR on a x64 machine. Here's how you do it: You need to compile your managed assembly with a target CPU of x86. This will...
  • Blog Post: Make DataTips Transparent

    Enhanced datatips are my favorite new debugger feature. However, sometimes you want to see underneath the tip without losing your spot. Fortunately, JimGries thought of that. You can make the DataTip transparent by pressing the ctrl key or middle mouse button. Here is an Enhanced DataTip In Visual...
  • 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: Tabs vs Spaces

    Of course, there is only one answer to whether tabs should be allowed in a source file. The utility of one is just so obvious I'll simply avoid commenting on it. :-) If you must wander from sources written with one convention to those written in another, you should definitely set Visual Studio...
  • Blog Post: Data Breakpoints

    The VS debugger allows two types of breakpoints. There are location breakpoints and data breakpoints. Each has lots of bells and whistles. However, sometimes people confuse a Location bp with a condition, for a data bp. That's unfortunate because a data bp solves a different problem. A data breakpoint...
  • Blog Post: Stop Mid Func Eval, Nested Break States

    A coworker mentioned Func Eval sounds like "Funky-val". Stopping at a breakpoint in the middle of a function evaluation could be considered funky. It is also useful. VS Whidbey allows stopping at a BP or Exception during a function evaluation in C# or VB code. To use it, you need to do the function...
  • 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: 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: Edit and Continue in C#

    We've finally announced C# will support E&C! I have been quite silent lately, and that is in large part due to coding, and bug fixing E&C. Please forgive me for not expounding more. I'm thrilled E&C is in both VB and C#. I'm also pleased I don't have to be silent about C# support anymore...
  • 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: Proactive vs Reactive tools: Evaluating Properties

    Proactive vs Reactive tools: Prop Eval One core principle for a debugger is that it should affect your program as little as possible. The reason is pretty straightforward. If your program runs differently under the debugger, the problem you are trying to solve might not reproduce. This is the underlying...
  • Blog Post: Automation Docs

    I got a comment on my SlimeTrail VS Add-In post that the documentation for Add-Ins was somewhat lacking compared to that provided for the frameworks. I sent around some mail and contacted Kemp, the UE guy doing Automation documentation for Whidbey. I’m not a very confrontational guy so telling someone...
Page 1 of 1 (22 items)