当我在锁(...)或唯一的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