코드에서 잠금 (...) 또는 IF 문만 사용하면 중단 점을 만들 때 모노 도이드에서 다중 스레드 응용 프로그램을 디버깅 할 때 작동하지 않습니다. 하지만 그것은 그 키워드 앞에 breakpoint를 만든 다음 단계별 디버깅을 할 때 작동합니다. 왜? 어떻게 고쳐?모노 도이드 멀티 스레딩 응용 프로그램에서 중단 점이 작동하지 않습니다.
코드 (센서 리스너 클래스) :
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
어떤 코드는 어떨까요? –
이제 코드 예제 – Brans