skip to Main Content

I have problems with my debugger go on a MacBook Pro M1 Pro.

When I try to debug my code I have this error:

"could not launch process: stub exited while waiting for connection: exit status 0" 

I got this error when launching the debugger via VSCode, Goland and via the "dlv debug" command.

I wanted to know if someone had a solution to my problem.

Here is some information about my configuration:

go version go1.18.5 darwin/arm64
Delve Debugger
Version: 1.9.0
Build: $Id: 69310c2f438e492f892d6af22e8e62c8ea1e9d8d $

3

Answers


  1. Check if running

    sudo /usr/sbin/DevToolsSecurity -enable 
    
    Login or Signup to reply.
  2. Re-installing XCode Command Line Tools should help.

    • Delete a previous version of XCode Tools:
    sudo rm -rf /Library/Developer/CommandLineTools
    
    • Install it from scratch:
    xcode-select --install
    
    Login or Signup to reply.
  3. None of the responses above worked for me. Then, after two days of research I saw someone saying that I should install the M1 version of VSCode (not the universal version!)

    I had the "Universal" version, but when I checked Activity Monitor I found out that it was running as Intel. So I uninstalled it and downloaded the M1 version (specifically) from here:

    https://code.visualstudio.com/download# (choose Apple Silicon).

    Now debugging in VSCode works fine (I haven’t tried in Goland).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search