Thanks for your feedback. The problem got resolved but there is a story.
I thought there could be an issue with update. So I installed the latest xxxxx68 update. As a result my task bar vanished. Nothing could be done to bring it back, I restarted many times.
Then I tried logout and login. And this time I did not use PIN ( I have been using the PIN from the installation time). and used forgot PIN.
I had to give a new PIN ( of course I used the same old PIN). and now when I signed out and signed in, presto, my task bar came back in all its glory.
So, I tried debugging my UWP app again .Now, the function did not crash. It simply worked like a good boy it has been in Windows 10.
There is a bug somewhere here, Microsoft. Well, it is yours not mine. Dont know it is a cause for glee or remorse.