air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.39k stars 773 forks source link

Debugger is stopped whenever change is made. #498

Closed ghostrepo00 closed 7 months ago

ghostrepo00 commented 7 months ago

I am running debugger in vs code with these following settings. Both air (dlv) and the attach process work fine initially, however as soon as I save a file change, the attach process will immediately stop. Is there any configuration to keep the attach process running despite dlv socket connection being reset?

Thanks

.air.toml

  args_bin = []
  bin = "tmp\\main.exe"
  cmd = "go build -o ./tmp/main.exe ./cmd/frontend"
  exclude_dir = ["assets", "tmp", "vendor", "testdata"]
  full_bin = "dlv exec .\\tmp\\main.exe --listen=127.0.0.1:2345 --headless=true --api-version=2 --accept-multiclient --continue --log -- "

attach configuration in vs code launch.json

{
    "name": "attach",
    "type": "go",
    "request": "attach",
    "mode": "remote",
    "port": 2345,
    "host": "127.0.0.1",
    "apiVersion": 2,
    "showLog": true
}