I saw this problem too, with a simple command-line C++ tool. My project(s) have "Automatically manage signing" checked, and I verified
CODE_SIGN_INJECT_BASE_ENTITLEMENTS
was Yes for Debug and Release. I'm on Xcode 10.3, Mac OS 10.14.6.
Debugging the tool worked fine on the machine where I created the project (same Xcode/OSX versions), but checking the project out of git on a different machine, this problem occurred - I hit run but it never hits the entry point of main and the same error is reported (but oddly it hides the console & you have to open it to see it). Like the poster above, running as root works around the issue, but for many reasons I do not want to do that.
Messing with my signing certificate ended up fixing the problem. In Keychain access I noticed my Mac OS Developer certificate was in System Roots but not in login. I dragged it into login. Then in the Xcode project Info settings (showing signing setup), there was an error message saying I needed to remove the current signing certificate in order to pick up the correct one. I clicked okay and the warning went away. Now, for some reason, there are two different copies of my Mac Developer signing certificate in keychain - same ID#, one dated a month ago, another dated today.
The good news is, it seems to be fixed, though there seems to be something a little off with the "Automatically manage signing" setting and keychain's management of certificates - either that or I did something wrong while setting it up (with a different project).