为什么TRACE会停止运作?(Why would TRACE stop functioning?)

编程入门 行业动态 更新时间:2024-10-09 03:28:35
为什么TRACE会停止运作?(Why would TRACE stop functioning?)

不幸的是,很难确定这一点何时停止工作......几天或一周前也许......

但是我们的软件的许多TRACE语句 - 归结为ATL::CTraceFileAndLineInfo(__FILE__, __LINE__) - 不再产生输出到VS 2013 Update 4调试器输出窗口。

我在那里得到了一些输出 - 第一个异常,线程存在,DLL加载和卸载等等......我们的踪迹中没有任何内容。

我最近更新了项目以恢复使用v120_xp工具集 - 但是当我对我们之前版本的软件进行双重检查时 - 我可以看到我们的项目完全相同(我之前的项目没有这样的问题)。

当然我做了一个干净的(我有一个批处理脚本比VS2013中的干净构建目标更彻底)。

追踪调用operator()......大约有十几个级别:

_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 );

最终终止于

OutputDebugStringW()

除此之外,我进入反汇编,我对遵循逻辑失去了兴趣。 但是当我们到达OutputDebugString()时,我们已经经历了所有干预级别,我们真的要求Windows输出消息......它只是不做。

它还提出了一个问题:改变了什么?

我已经通过几个版本的源代码控制,并通过与去年的代码库进行比较,我没有看到任何新的/相关的。

上周四有一个Windows更新....

...有没有其他人突然失去了将他们的TRACE输出看到VS2013调试窗口的能力? 以前发生过这件事(谁知道如何解决)?


更新:5/18下午5:07美国东部时间“修复”选项 - 没有帮助清洁 - 没有帮助重新启动 - 没有帮助完成所有调试选项(已经正确 - 并切换它们/将输出移动到即时窗口) - 没有帮助运行其他项目 - 也没有输出

...卸载VS2013接下来......


2015年10月12日更新:没有任何效果。 该项目的跟踪继续在其他机器上运行。 我不得不从头开始重新安装Windows,然后它恢复工作。

这些项目从未改变过。 但那台PC上的东西停止了工作。 谁知道?!

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?!

最满意答案

第一个猜测: 你停止了与MFC的调试版本的链接 。 (但是如果调用OutputDebugStringW则不太可能)

您可以检查API本身是否与DbgView一起使用,以查看问题是在系统API中还是在VS中。

Visual Studio输出窗口不显示Debug.Write()发送的消息,提到VS中的一些相关选项。 我还没找到任何M $ bug报告。

列出您获得的更新可能会提供一些已更改的内容。

重置VS设置然后重新启动VS(如果重置没有这样做,关闭VS后,从源树中删除任何.user和.suo文件)可以帮助,如果这是一个新的代码旧配置类型搞砸了。

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?!

更多推荐

本文发布于:2023-04-29 08:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335569.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:TRACE   stop   functioning

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!