When Debug.Print Doesn’t Work Anymore

Filed under .NET, Troubleshooting, VB Feng Shui

This is one of those “back to basics” posts that, none-the-less, tripped me up for a few minutes, just because it’d been so long since I’d even looking at the setting involved.

I’d been working on a project for a while, when, one day a few weeks back, debug.print just stopped working. Even weirder, when I’d debug, the debugging would completely skip over the Debug.print statement.

When it first happened, I was right in the middle of working through some other problem and didn’t want to get sidetracked. But it hit me again a few weeks later, and I decided to start looking around.

It didn’t take long before I realized this setting was amiss.

cap1

It’s checked in the image above, but in my project, somehow it’d become UNCHECKED, and in the Debug project configuration!?

Still not sure how that happened, other than probably got a little click happy one day with the mouse and didn’t realize it.

Amazing how the little things can still get ya’ sometimes…

(and nobody say anything about my dll base address <g>! )

2 Comments

  1. Gabor says:

    I had the same problem.
    I tried out a lot of tip, like settingthe Options toshow debug messages inoutput window, or delete the bi/debug directory, even your idea. But the heckbox was checked.
    Nothing helped.
    Finally I made a project Clean and rebuild.
    And then I was able to see your check missing. I checked it and it works now. thx

  2. Darin says:

    Hi Gabor

    Thanks for the comment. Glad you were able to get it sorted out. Interesting about creating a clean project. I’m guessing something about the project file had become corrupt in your case, but still, it’s surprising that it’d even load in that case.

    However, in playing with the vbproj file while integrating msbuild functions for continuous integration, I’ve run into cases where I’d screwed up the proj file in a very minor way, but all sorts of things would stop working mysteriously.

    Fortunately, having the project under version control helped there tremendously. A quick diff was all it took.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*