xCode suddenly stopped working; random codesigning request

I've been using Xcode Version 11.3.1 for years to write c++ code. Out of the blue it asked for some codesign key chain something or other. I entered in my computer login password and clicked allow, but now suddenly I can't run any code in Xcode any more (I get dubugger code 1?? I can't even get into debugging mode). I try to compile the code from the terminal and then run, and I get a core dump.

What is causing this and how do I fix it?

As an aside, why the heck do I need to log in with my Apple ID just to ask a question?

xCode suddenly stopped working; random codesigning request
 
 
Q