I was working on a different portion of my app and finally got back to working on a TableView that I had "finished" before. When you click on a Row in the TableView it should load a new View. I was pretty sure this was working, however now when I click on a Row, the app just freezes with the Row highlighted.
I have waited 10 minutes on this and nothing happens, just frozen. No error or anything.
So, I tried to put in some breakpoints on the TableView and when I run the App, in the Application Output section I see "Could not insert pending breakpoint at XXXXX.cs"
I have no idea what is going wrong here or how to fix it. Help?
EDIT
Could this h开发者_运维百科ave anything to do with the fact that the new View is launched from a different Thread? If so, how do you debug on separate threads?
END EDIT
It seems like your code is not being executed at all. During debugging, the compiler knows that your code will never be called and shows you that message. Try putting a break point in a different method and see if that works.
Also, you may pushing the new view from a thread other than the main UI one, which could cause it to not show up. In general, whenever you're handling user input and updating the view, you should do that inside the main thread. For example, from inside your TableViewController, do this:
InvokeOnMainThread({()=>{
NavigationController.PushViewController(new UIViewController(), true);
});
Hope that helps.
精彩评论