I tried to set a breakpoint using WinDbg at a source code of a c# application, but it didn’t work. Is there a way to set a breakpoint at a source code of managed application when I use WinDbg?
Repro step is the below:
1.Make a simple c# application
class Proram
{
static void MyWrite(){
Console.WriteLine("test");
}
static void Main(string[] args){
Console.ReadLine();
MyWrite();
}
}
2.Start the .NET application from WinDbg
3.Open its source file into WinDbg
4.Break execution (while the app in ReadLine())
5.Setup symbol path and load sos.dll
6.Set a breakpoint at Console.WriteLine("test") using F9
7.Execute "g" command
8.Error occurred
Unable to insert breakpoint 0 at <address>, Win32 error 0x998
"Invalid access to memory location."
bp0 at <address> failed
WaitForEvent failed
I have the app's private symbol, so I don't think this is a symbol related problem.