. Advertisement .
..3..
. Advertisement .
..4..
The error: “Couldn’t start dlv dap: Error:timed out while waiting for DAP server to start” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
What is “Couldn’t start dlv dap: Error:timed out while waiting for DAP server to start”?
If you’re new to VsCode DLV dap debugging, you can get the following problem.
Couldn't start dlv dap:
Error:timed out while waiting for DAP server to start
Cause of error
The root of the issue (if it actually solves the problem) will be that your version of Golang isn’t the version that is being targeted by dlv-dap. Anything lower than Go version 1.15 requires legacy mode. And the latest version of the debugger skips the legacy mode automatically now.
How to deal with it?
We’ve rounded up some of the solutions below. Each method will have different pros and cons, so consider choosing the right one for you.
Approach 1: For using macOS
If you’re using macOS, run this code:
brew install delve
Approach 2: Go: Install/Update Tools
The current upgrade to the versus code Go extension causes this problem.
- Open the Vs Code Studio application.
- If you’re using Windows, use Ctrl+Shift+P.
- If you’re using Linux, press ⇧+⌘+P.
- “Go: Install/Update Tools” should be run.
- Now, select dlv and dlv-dap from the options and click OK to begin the installation/update process.
- Your issue will now be resolved.
For more details, see the photo below:
......... ADVERTISEMENT .........
..8..

......... ADVERTISEMENT .........
..8..

Approach 3: delveConfig should be set to legacy mode.
Just give docker permission 666. Simply run the following command:
"go.delveConfig":{
"debugAdapter":"legacy"
}
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “Couldn’t start dlv dap: Error:timed out while waiting for DAP server to start” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Leave a comment