System.Diagnostics.Debuggerがよくわからない
というより、Windowsのデバッガに関する知識がないのだけど。
これ、どう違うの?
こんなコードを書いて、cordbgを動かしてみた。面倒だから色分けしないけど。
C:\Test>cordbg Microsoft (R) Common Language Runtime Test Debugger Shell Version 3.5.21022.8 (RTM.021022-0800) Copyright (C) Microsoft Corporation. All rights reserved. (cordbg) m LoggingMessage 0 AppDomainLoads=0 AppDomain and Assembly load events are not displayed ClassLoads=0 Class load events are not displayed EnhancedDiag=0 Suppress display of diagnostic information ISAll=0 All interceptors are skipped ISClinit=0 Class initializers are skipped ISExceptF=0 Exception filters are skipped ISInt=0 User interceptors are skipped ISPolicy=0 Context policies are skipped ISSec=0 Security interceptors are skipped JitOptimizations=0 JIT's will produce debuggable (non-optimized) code LoggingMessages=0 Managed log messages are suppressed ModuleLoads=0 Module load events are not displayed SeparateConsole=0 Debuggees share cordbg's console ShowArgs=0 Arguments will not be shown in stack trace ShowTypeArgs=0 Type arguments to generic methods will not be shown in stack trace ShowModules=0 Module names will not be shown in stack trace ShowStaticsOnPrint=0 Static fields are not included when displaying objects USAll=0 Unmapped stop locations are skipped USEpi=0 Epilogs are skipped, returning to calling method USPro=0 Prologs are skipped (cordbg) r Debuggee.exe Process 1896/0x768 created. Warning: couldn't load symbols for C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll [thread 0x1364] Thread created. Warning: couldn't load symbols for C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_ja_b77a5c561934e089\mscorlib.resources.dll [001e] nop (cordbg) g Debugger.IsAttached Debugger.IsLogging() [0091] nop (cordbg) g program end. [thread 0x6f0] Thread created. Process exited. (cordbg) ex
LoggingMessagesを0に設定したのでDebugger.Log()のメッセージは出力されていないのだけど、Debugger.IsLogging()はtrueを返しているようだ。わからん。
この本を読み返してみるか。
.NET&Windowsプログラマのためのデバッグテクニック徹底解説 (マイクロソフト公式解説書)
- 作者: ジョンロビンズ,John Robbins,豊田孝
- 出版社/メーカー: 日経BPソフトプレス
- 発売日: 2003/10/28
- メディア: 単行本
- 購入: 1人 クリック: 47回
- この商品を含むブログ (32件) を見る
それとも、こっち?
Windowsデバッグの極意 ツールを使いこなして、バグハント!
- 作者: Mario Hewardt,Daniel Pravat,長尾高弘
- 出版社/メーカー: アスキー・メディアワークス
- 発売日: 2009/04/28
- メディア: 大型本
- 購入: 4人 クリック: 128回
- この商品を含むブログ (29件) を見る