Debug.Printを使用します。Console.WriteLineでは出力できません。
デバッグ文の出力方法
-
C#
// usingが必要 using System.Diagnostics; Debug.Print("デバッグ文を表示");
-
VB.NET
Debug.Print("デバッグ文を表示")
- 実行結果
サンプルコードのダウンロード
サンプルコードの実行には Microsoft Visual Studio 2015 以上のバージョンが必要です。検証環境
- Microsoft Visual Studio Professional 2015 Version 14.0.25431.01 Update 3
- Microsoft .NET Framework Version 4.6.01055
- Microsoft Windows 7 Professional Service Pack 1 (Microsoft Windows NT 6.1 (7601))