當我在鎖(...)或唯一的IF語句在代碼中進行斷點調試monodroid中的多線程應用程序時,它不工作。但是,當我在關鍵字前做出斷點,然後逐步調試時,它就可以工作。爲什麼?該如何解決?斷點不工作在Monodroid多線程應用程序
代碼(傳感器監聽器類):
static object lockAll = new object();
public void OnSensorChanged(SensorEvent ev)
{
int g1 = 8; //Breakpoint in this place works
lock (lockAll)
{
int g2 = 8; //Breakpoint in this place isn't works
}
}
或者:
public void OnSensorChanged(SensorEvent ev)
{
Sensor curS = ev.Sensor; //Breakpoint in this place works
if (curS.Type == SensorType.Accelerometer)
{
int g2 = 8; //Breakpoint in this place isn't works
}
}
我接受:) – Brans 2012-08-01 15:53:36
有些代碼呢? – 2012-08-01 15:54:58
現在你可以看到代碼示例 – Brans 2012-08-02 07:48:16