79217521

Date: 2024-11-23 09:31:55
Score: 0.5
Natty:
Report link

2024 - Tested with Visual Studio Code v1.95.3 and Unity v2022.3.49f1

First, enable developer options on the device side. On Unity side, "Check Development Build", "Script Debugging" and "Wait For Managed Debugger" then Build and Run. When the application starts, it will show which port it is running on.

Add a new configuration to launch.json file in Visual Studio.

{
    "name": "Attach to Unity Device",
    "type": "vstuc",
    "request": "attach",
    "endPoint": "<WLAN IP>:<PORT>"
}

Select the new configuration and attach the debugger.

Now you can debug with breakpoints, watch etc. without editor. However, when the script changes, you need to rebuild the app and deploy it to the device.

Full sample is in here (9:47): https://www.youtube.com/watch?v=OVWN7RdNk4M

Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: apphitect