Pur*_*ome 8 c# debugging windbg
我有一个我做的Windows服务转储.例外是我的代码无法移动文件(出于某种原因).现在,在我的代码中有很多地方可以在文件系统周围移动文件.所以,使用Windbg,我试图看到发生异常的代码.
这是我的!clrstack转储..
0:016> !clrstack -p
OS Thread Id: 0xdf8 (16)
Child-SP RetAddr Call Site
0000000019edea70 0000064278a15e4f System.IO.__Error.WinIOError(Int32, System.String)
PARAMETERS:
errorCode = <no data>
maybeFullPath = <no data>
0000000019edead0 0000064280181ce5 System.IO.File.Move(System.String, System.String)
PARAMETERS:
sourceFileName = <no data>
destFileName = <no data>
0000000019edeb50 0000064280196532 MyClass.Foo.DoSomeStuffInHere(System.String)
PARAMETERS:
this = 0x0000000000c30aa8
filePathAndName = 0x0000000000d1aad0
Run Code Online (Sandbox Code Playgroud)
现在,这有很大帮助......
0:016> !do 0x0000000000d1aad0
Name: System.String
MethodTable: 00000642784365e8
EEClass: 000006427803e4f0
Size: 88(0x58) bytes
(C:\WINDOWS\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
String: C:\BlahBlahFolder\FooFolder\4469.jpg
Fields:
-snipped-
Run Code Online (Sandbox Code Playgroud)
所以我发现了无法移动的文件.KEWL.但我只是想看看调用File.Move(..)的MyClass.Foo.DoSomeStuffInHere(System.String)方法中的代码.该方法有很多File.Move ..所以我可以把try/catches/debug/trace信息..但我希望通过使用Windbg来帮助找到这个问题更有效率.
有什么想法吗?