Ok tried whether my speculation about standalone build are true or not. Was able to get standalone build debug working in following way:
-
In build options enable “development build” and “script debugging”
-
[optional] in the build output folder edit build_folder/NAME_Data/boot.config . Change managed-debugger-fixed-port to the port value you want to use.
-
install mono debug vscode extension Mono Debug - Visual Studio Marketplace
-
Create the debug config in launch.json example below
-
start the executable
-
use the “mono attach” debug target
In the port field specify the same port you wrote in boot.config.
{
"name": "mono attach",
"type": "mono",
"request": "attach",
"address": "localhost",
"port": 123123
},
If you didn’t specify a fixed port in boot.config Unity will choose a random one each time. You can find out which port it chose in Player.log. Near the top there should be a line similar to:
Starting managed debugger on port 56189
Since it was somewhat generic mono debugger. I guess other tools which support debugging mono might work in similar way.