Incorrect "Goto Definition" behavior in BP for native (C++) functions

The behavior of “Goto Definition” action of Blueprint Editor is broken. If C++ UE project is run from Visual Studio then “Goto Difinition” action trying to open another instance of Visual Studio instead of using instance from which UE project is run. Moreover, the newly opened Visual Studio still failed to show the proper place of requested function definition. Because of that “Goto Definition” is broken completely in UE 4.18.0

UE version: Version: 4.18.0-3709383+++UE4+Release-4.18

Steps to reproduce:

  1. Create C++ UE project (on the same disk where UE installed, see below)
  2. Open project in Visual Studio
  3. Run project from Visual Studio
  4. Create any Blueprint, add any native node to it and issue “Goto Definition” action on that native node

Expected behavior: Visual Studio window from which project is run became active and go to foreground and show the definition of function corresponding to native BP node in question.

Observed behavior: new instance of Visual Studio started, showing error messages about browsing database and IntelliSense database are opened by another instance of Visual Studio (the one from which project is run actually). This new instance dosn’t show correct place of function definition.

Important notice: In my case the UE installed on the same disk on which I store my projects, I think it is part of problem (see technical details below)

Bug technical details:

The problem actually is incorrect implementation of AccessVisualStudioViaDTE(…) function (VisualStudioSourceCodeAccessor.cpp). And in particular is in following part of code:

if (Filename == InSolutionPath)
{
  OutDTE = TempDTE;
  AccessResult =  EAccessVisualStudioResult::VSInstanceIsOpen;
}

The problem is: Filename is absolute path while InSolutionPath is relative. While they are point to same solution file, they are not equal as a strings (e.g. “D:\UEProjects\SomeProject\someproject.sln” and “…\…\…\…\…\UEProjects\SomeProject\someproject.sln”).

As a simplest solution, the InSolutionPath and Filename should both be converted to normalized absolute form before comparison in order to fix the issue.

Hey DVRQProgrammer-

This issue is a symptom of another reported issue here: Unreal Engine Issues and Bug Tracker (UE-51608) . We don’t yet have a time frame on when this will be fixed, however you can track the report’s status as the issue is reviewed by our development staff.

Cheers

Hi,

Thanks for your reply. The fix is actually extremely easy - please look details in my report. The new “Goto Definition” implementation was announced as an improvement in UE 4.18 but actually it terribly broke this functionality completely (at least for us). Would be nice if it will be fixed in upcoming 4.18 update.

We have the same issue on all our workstations when using 4.18. Trying to “Go To Definition” will always open a new visual studio instance and because it has the wrong path it will take a long time to open.

Completely broken and very annoying now because even inadvertent (double) clicking on the node will do it.

Hi . Could you please consider removing the “Backlogged” status of the issue (UE-51608). The issue has already amassed a large number of votes in the few weeks since the release of 4.18, so it seems to be affecting a lot of people. Also it seems like the fix would be trivial to implement (according to DVRQProgrammer).