Live coding window doesn't open the desired external code editor

Does anybody know if there is a way to point the Live Coding window to the projects external code editor?

I am using Rider, but if the Live Coding window tells me there is an error and I double click, it always opens Visual Studio (even though I have Rider set in the editor prefs).

I don’t use Rider so I wouldn’t know about its specifics but:

I had a similar problem where LiveCoding would redirect to the UE5 Engine solution (UE5.sln) rather than the game project solution I was building. Fixed it by passing the game project .sln file path as an argument to LiveCoding when it is launched from the engine (in LiveCodingModule.cpp).
And I received the path and wrote it in to the “CachedSolutionPathOverride” of the visual studio source code accessor to fix it (LiveCodingConsole.cpp).

I think your problem lies in LiveCodingConsole.cpp, LiveCodingConsoleMain function. There you will see the following lines:

#if PLATFORM_MAC
			IModuleInterface& XCodeSourceCodeAccessModule = FModuleManager::LoadModuleChecked<IModuleInterface>(FName("XCodeSourceCodeAccess"));
			SourceCodeAccessModule.SetAccessor(FName("XCodeSourceCodeAccess"));
#elif PLATFORM_WINDOWS
			IModuleInterface& VisualStudioSourceCodeAccessModule = FModuleManager::LoadModuleChecked<IModuleInterface>(FName("VisualStudioSourceCodeAccess"));
			SourceCodeAccessModule.SetAccessor(FName("VisualStudioSourceCodeAccess"));
#endif

As you can see, it only initializes VisualStudioSourceCodeAccess and not the RiderSourceCodeAccess. If you instead replace the module with RiderSourceCodeAccess module, it should work fine.

Don’t forget to rebuild the LiveCodingConsole project under programs and make sure the produces .exe is properly named.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.