3

Unfortunately, it's hard to pin-point when exactly this stopped working... a few days or a week ago perhaps...

But our software's many TRACE statements - which boil down to ATL::CTraceFileAndLineInfo(__FILE__, __LINE__) - no longer produce output to the VS 2013 Update 4 debugger output window.

I get some output there - firstchance exceptions, thread exist, DLL loads & unloads, etc., ... just nothing from our traces.

I recently updated the projects to revert to using v120_xp toolset - but when I double checked against our previous version of software - I can see that our projects are exactly the same (and I had no such issue with the former projects).

Of course I did a clean (I have a batch script that is even more thorough than the clean build target in VS2013).

Tracing through the call into operator()... goes about a dozen levels deep to:

_CRTIMP int __cdecl _VCrtDbgReportW
(
    int nRptType,
    void * returnAddress,
    const wchar_t * szFile,
    int nLine,
    const wchar_t * szModule,
    const wchar_t * szFormat,
    va_list arglist
);

Which finally terminates at

OutputDebugStringW()

beyond that I get into disassembly and I lose interest in following the logic. But by the time we get to OutputDebugString() we've gone through all of the intervening levels and we really are asking Windows to output the message... which it just doesn't do.

It also begs the question: what changed?

I've gone through source control several versions back, and through comparison to last year's code base, and I see nothing new / relevant.

There was a Windows update last Thursday....

...has anyone else suddenly lost the ability to see their TRACE output to the VS2013 debug window? Has this happened to anyone before (who knows how to solve it)?


Update: 5/18 5:07PM EST "Repaired" option - didn't help Clean - didn't help Reboot - didn't help walked through all of the debugging options (were already correct - and toggling them / moving the output to the immediate window) - didn't help Running other projects - no output also

... uninstall VS2013 is next...


10/12/2015 Update: Nothing worked. Trace for that project continued to work on other machines. I had to reinstall Windows from scratch, and then it resumed working.

The projects never changed. But something on that PC stopped working. Who knows?!

Mordachai
  • 9,412
  • 6
  • 60
  • 112
  • This is when version control systems come in very handy! Then you can go back and figure out when it last worked, and what you changed that stops it from working.... – Mats Petersson May 18 '15 at 18:39
  • Did it break everywhere? Was VS upgraded recently? Does a pristine/rebuilt old version of software work? – ivan_pozdeev May 18 '15 at 18:44
  • Visual Studiio - Tools, Options, Debugging, Output Windows - check if you have Visual Studio routing debug output into output window. In started outside of debugger (Visual Studio or other) you can check if the generated output is captured by DebugView (which would prove the app is good and Visual Studio settings are not). – Roman R. May 18 '15 at 18:47
  • MatsPetersson We do use Vault - I did do a detailed comparison back a few check-ins to see if anything seemed like it could be responsible: Nope. ivan_pozdeev I'm not sure what if-any components in VS2013 were updated from last Thurs. RomanR. "All debug output" is on, exception messages on, etc. Just went back to last year's codebase - compiled & run - NO debug output (captured in VS2013). So something on my system / VS2013, not in the code base is to blame... – Mordachai May 18 '15 at 19:26
  • maybe it has something to do with tracing level, from VS2013 you need to set it from inside of your application: http://blogs.msdn.com/b/vcblog/archive/2013/08/20/atl-and-mfc-changes-and-fixes-in-visual-studio-2013.aspx – marcinj May 18 '15 at 21:48
  • Thanks for the link - unfortunately, our year-old codebase as well as our new codebase stopped outputting trace information to the IDE - however, if I use DbgView and detach the IDE, then I can see the debug trace messages... (and this is consistent with my code-level debugging) - so clearly our app is outputting the trace information - but VS2013 is failing to capture & display it correctly. This has to be a system update issue, because it was working, then it just wasn't anymore. – Mordachai May 19 '15 at 12:57

2 Answers2

1

The first guess: you stopped linking against a debug version of MFC. (but if OutputDebugStringW is called, that's not likely)

You may check if the API itself works with DbgView to see if the problem is in the system API or in VS.

Visual Studio output window is not displaying messages sent by Debug.Write() mentions a few relevant options in VS. I can't yet find any M$ bug reports.

Listing the updates you got may provides some ideas of what has changed.

Resettings VS settings then restarting VS (plus deleting any .user and .suo files from the source tree after closing VS if the reset didn't do that) can help if this is a new-code-old-config-type screw-up.

Community
  • 1
  • 1
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
  • 1
    Huh - dbgview is silent. empty window that just sits there... I assume normally various debug output should just show up there... Okay - I see the debug output once I detach VS2013 from my process. So we're still outputting... but VS2013 has stopped being able to process the output (or there is a setting in it that got borked) – Mordachai May 18 '15 at 19:32
  • 1
    Okay, so, it's guessing about what's happening inside VS here. – ivan_pozdeev May 18 '15 at 19:37
  • yes, must be. I haven't changed any settings in VS2013 - definitely not - so it stopped working on its own - either from a system update, or from an internal component misconfigured, or some-such. I may have to resinstall if just poking at it doesn't work. – Mordachai May 18 '15 at 19:47
0

10/12/2015 Update: Nothing worked. Trace for that project continued to work on other machines. I had to reinstall Windows from scratch, and then it resumed working.

The projects never changed. But something on that PC stopped working. Who knows?!

Mordachai
  • 9,412
  • 6
  • 60
  • 112