First time trying Unity and I’m having an issue with debugging scripts. Specifically, I’m getting the following error when when starting a debug run by pressing the “Start debugging” button in VS Code to attach to the Unity Editor:
2019-12-02 23:13:27.784] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms
at t.RawDebugSession.handleErrorResponse (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2798:1003)
at file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2798:434
at async t.RawDebugSession.shutdown (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2796:536)
This is the output from the console. It looks as if it attaches, but then times out?
UnityDebug: Initializing
UnityDebug: Searching for Unity process 'Unity Editor'
UnityDebug: Attached to Unity process 'Unity Editor (Unity)' (14608)
I’m running Unity and VSCode as a regular user.
I’ve tried restarting both Unity and VS Code but the error remains.
What to do?
System info:
System:
Pop_OS! 19.10
VSCode Unity plugin 2.7.2
Unity:
Version 2019.3.0f1 (ffacea4b84e7) Personal
Fri, 22 Nov 2019 03:55:52 GMT
Branch: 2019.3/staging
It seems the problem arises as soon as a break point is hit. Since I had breakpoints on Start() and Update() a breakpoint were guaranteed to be hit as soon as the debugger attached to Unity.
The question is now, what am I doing wrong, surely breakpoints are supposed to work?
Hi,
I’m experiencing the same problem but on macOS. I cannot debug my app anymore using Visual Studio Code. However I can debug the same app using Visual Studio for Mac.
I downloaded Jetbrains Rider and it can debug just fine so it does seems the VS Code extension is the cause. I’ll file an issue pointing to this thread.