"Requested but did not find extension point" errors when using command line

When I use a Xcode/Dev cli command (e.g. git) I get a short timeout and then these errors. e.g.:

gerben@hermione ~ % xcodebuild -h 2022-07-31 10:57:53.045 xcodebuild[1461:9044] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore 2022-07-31 10:57:53.045 xcodebuild[1461:9044] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [<buildsetting>=<value>]... [<buildaction>]...

How do I get rid of these errrors? I tried starting Xcode and removing/(re)installing components, all kinds of actions with xcode-select. Nothing helps. macOS 12.4 21F79 and Xcode 13.4.1 (13F100).

May be a problem with Xcode not finding command line tools properly. I had essentially the same issue using Git from the command line and this fixed it for me:

// reset to the default command line tools path
sudo xcode-select -r

// Link xcode-select with CommandLineTools
sudo xcode-select -s /Library/Developer/CommandLineTools

Got this answer from a response to a similar question on SO: https://stackoverflow.com/questions/72668916/requested-but-did-not-find-extension-point-with-identifier-xcode-idekit-extensio

"Requested but did not find extension point" errors when using command line
 
 
Q