XCode preview error

Hello! Last night i spend many time to try fix error in XCode layout preview after source code change. But if I change layout using inspector it works fine then I change my code and it breaks with the error below.

I can attach full report if it needs. Ive tried to use XCode 11, 11.1, 11.2 beta 2 and error still exists.


Running on Macbook Air 13 2018 (Mojave)


And all i see is:


UVIntegration.DTXMessageError.messageRepliedWithError("Connecting to launched interactive agent 1849", Optional(Error Domain=com.apple.dt.ultraviolet.service Code=17 "connectToPreviewHost: Failed to connect to 1849: Error Domain=com.apple.dt.ProcessAttachUtilities Code=2 "Unable to create a RemoteBundleLoader; target is already invalid" UserInfo={NSLocalizedDescription=Unable to create a RemoteBundleLoader; target is already invalid}" UserInfo={NSLocalizedDescription=connectToPreviewHost: Failed to connect to 1849: Error Domain=com.apple.dt.ProcessAttachUtilities Code=2 "Unable to create a RemoteBundleLoader; target is already invalid" UserInfo={NSLocalizedDescription=Unable to create a RemoteBundleLoader; target is already invalid}})))


----------------------------------------


GenericHumanReadableError: unexpected error occurred


messageRepliedWithError("Connecting to launched interactive agent 1849", Optional(Error Domain=com.apple.dt.xcodepreviews.service Code=17 "connectToPreviewHost: Failed to connect to 1849: Error Domain=com.apple.dt.ProcessAttachUtilities Code=2 "Unable to create a RemoteBundleLoader; target is already invalid" UserInfo={NSLocalizedDescription=Unable to create a RemoteBundleLoader; target is already invalid}" UserInfo={NSLocalizedDescription=connectToPreviewHost: Failed to connect to 1849: Error Domain=com.apple.dt.ProcessAttachUtilities Code=2 "Unable to create a RemoteBundleLoader; target is already invalid" UserInfo={NSLocalizedDescription=Unable to create a RemoteBundleLoader; target is already invalid}}))


Any ideas how to fix it?