Hi,
I'm trying to figure out how the Mdbg sample works so i tried to create a simple de**** handling breakpoints.
So this is a sample of my code:
public void Start(Projet proj) { _de****Mdbg = new MDbgEngine(); _de****Mdbg.Options.CreateProcessWithNewConsole = true;
//Fire event OnDebugSessionStarted();
DebugModeFlag debugMode = DebugModeFlag.Debug; // version should be v.2.0.50727 string debuggeeVer = CorDe****.GetDe****VersionFromFile(proj.OutputAssemblyName);
MDbgProcess p = _de****Mdbg.Processes.CreateLocalProcess(debuggeeVer); p.DebugMode = debugMode; p.CreateProcess(null, proj.OutputAssemblyName);
//Add breakpoint
_de****Mdbg.Processes.Active.Breakpoints.CreateBreakpoint(fileName, line); p.Go().WaitOne(); OnLocationChange(); }
The process is launched, a console window appear but when I call p.Go().WaitOne(), the WaitHandle never get signaled. My application freezes because the thread is blocked at that point. The MDBGProcess doesn't receive any event from the CorProcess object like the OnBreakpoint event.
I tried figuring out what was missing by running the sample with the gui extension. In the Mdbg sample OnBreakPoint get signaled even though no breakpoint was added. The MdbgLocation is then set to the first line of code it can reach.
Thanks,
Joe
.NET Development34
|