I had some issues with the editor crashing on launch, so I tried to delete some of the cached files. I deleted the folders Binaries, DerivedDataCache and Intermediate. The editor didn’t launch at all after this, so I restored all of those folders. Now, in Visual Basic the Launch Windows Debugger button disappeared and changed into an Attach… button:
Set as startup project worked for me too, but not in UE5 inside the Engine folder, but in the file with the name of your project, under the Game folder.