[Help] UE 5.8 Cannot install VisualStudioTools plugin with compile error “cannot open include file: ‘BlueprintGraphClasses.h’”

I’m unable to install the VisualStudioTools plugin in the latest UE 5.8.
I created a C++ project based on UE 5.8. After opening Visual Studio and checking the Unreal Engine integration configuration, it prompted me to install the VisualStudioTools plugin version 2.8. When I click the “Install to Engine” button, I get a compile error: “cannot open include file: ‘BlueprintGraphClasses.h’”.
Has anyone else encountered this? Any help would be greatly appreciated.

Solution (I found the fix myself):

Instead of installing to the Engine, choose “Install to Project”. This will add the plugin’s source code to your project, and you’ll need to compile it before it can be used.

Before compiling, open the file VisualStudioToolsBlueprintBreakpointExtension.cpp and at the very top replace BlueprintGraphClasses.h with K2Node_CallFunction.h – this eliminates the compile error.

However, before compiling you must regenerate the Visual Studio project files: right-click on your project’s .uproject file and select “Generate Visual Studio project files”. Once that’s done, you can compile the plugin successfully.

Finally, in the Engine’s Plugins directory, make sure a Marketplace folder exists, then place the compiled plugin inside it. That’s all.