开发者

How do you stop linqpad from displaying the output of statements written to Debug.Writeline?

Linqpad seems to put a listener into the debug.listeners collection and then present the outputs of trace to the results window, along side any of the results from the query itself.

Is there a way of telling linqpad not to do this but to leave the existing debug.listeners collection alone?

I have an assembly I'm calling from linqpad which writes trace out to a separate application but it appears that linqpad clear开发者_如何学运维s down the listeners and puts its own in, ideally I would like the existing listeners left in tact so I get our normal trace out of the library.

Thanks for any suggestions Tollo


I had the same problem.

I am referencing a third party library (Google.GData.YouTube) that is outputting a bunch of trace information that I don't want. Joe's solution didn't work for me but the question gave me a clue and I worked around the problem by adding the following to my query.

Debug.Listeners[0].Dispose();


If you go to Edit | Preferences | Advanced, and select 'Always use fresh app domains', does it make any difference?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜