iT邦幫忙

0

微軟 Visual Studio 2019 的除錯訊息沒出現 Console.WriteLine

  • 分享至 

  • xImage

各位好:
原本 Visual Studio 2017 等以往版本除錯方式之一:

Console.WriteLine("顯示在輸出運算視窗");

經改用Visual Studio 2019後,
找不到在哪邊可以檢視,有方式可以顯示出來嗎?

以下Debug方式輸出訊息是可以的,但不想改用Debug

Debug.WriteLine("不想用甚麼 Debug,我要用 Console");

不想改用Debug輸出的原因是,同時要碰的2~3種語言,在開發過程要快速看個結果都已經習慣用"Console"來打字~

P.S. 看到一些國外論壇設定,也有人在討論這件事

1.But the question still remains: where is Console.WriteLine output going, and why isn't it showing up in the Output window, as it did in VS 2017? Was this an intentional change? Was it documented anywhere? Certainly seems to violate the "principle of least surprise".

2.Marcus Möhrmann
is also not woking when non-debugging (Ctrl-F5)

Please do not destroy basic functions when programming new VisualStudio Versions !!!

然後據說 VS 2022就已經被改回來可以使用了...

https://ithelp.ithome.com.tw/upload/images/20220927/20136448nF9PMzo6Nl.jpg

這一篇看過了
https://ithelp.ithome.com.tw/questions/10193290

看更多先前的討論...收起先前的討論...
powerc iT邦新手 1 級 ‧ 2022-09-27 17:20:47 檢舉
雖然不知道為何不願意換debug,加上你也沒說你是寫哪種應用,我猜是winform吧
所以我上網查了一下,你參考看看
https://learn.microsoft.com/en-us/answers/questions/281681/vs-2019-consolewriteline-output-not-present-in-out.html
VS 2022可以用,要不要考慮升級?
kinhp iT邦新手 5 級 ‧ 2022-09-28 10:05:17 檢舉
To powerc: 沒錯,是winform
kinhp iT邦新手 5 級 ‧ 2022-09-28 10:26:19 檢舉
To Coding小僧: 目前環境只能先2019了...
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
JamesDoge
iT邦高手 1 級 ‧ 2023-02-14 09:12:48

結論更新 Visual Studio 2022 或後續版本

我要發表回答

立即登入回答