Giter Site home page Giter Site logo

Comments (7)

hyangah avatar hyangah commented on June 10, 2024

@krav-la Thanks for the report. This is caused by v0.41.0 using Delve DAP as the default debug adapter for remote debugging.

Is it possible for you to find the remote workspace, goroot, and module cache paths? If so, can you give a try to formulate the substitutePath configuration ? e.g.

{
    "name": "Connect to server", 
      ...
     "substitutePath": [
         {
             "from": "${workspaceFolder}", "to": "/remote/path/to/workspace",
             "from": "/local/path/to/gomodcache", "to": "/remote/path/to/gomodcache",
             "from": "/local/path/to/goroot", "to": "/remote/path/to/goroot", 
         },
     ]
}

/local/path/to/gomodcache can be found with go env GOMODCACHE.
/local/path/to/goroot can be found with go env GOROOT.

It will be nice if the VSCode Go extension or Delve can automate this mapping computation.

If this is too tricky, the last resort is to use the legacy debug adapter by adding "debugAdapter": "legacy" to the configuration.

from vscode-go.

gm0stache avatar gm0stache commented on June 10, 2024

-> related issue: #3096 (comment)

could you please link the two?

from vscode-go.

sasklacz avatar sasklacz commented on June 10, 2024

@krav-la Thanks for the report. This is caused by v0.41.0 using Delve DAP as the default debug adapter for remote debugging.

Is it possible for you to find the remote workspace, goroot, and module cache paths? If so, can you give a try to formulate the substitutePath configuration ? e.g.

{
    "name": "Connect to server", 
      ...
     "substitutePath": [
         {
             "from": "${workspaceFolder}", "to": "/remote/path/to/workspace",
             "from": "/local/path/to/gomodcache", "to": "/remote/path/to/gomodcache",
             "from": "/local/path/to/goroot", "to": "/remote/path/to/goroot", 
         },
     ]
}

/local/path/to/gomodcache can be found with go env GOMODCACHE. /local/path/to/goroot can be found with go env GOROOT.

It will be nice if the VSCode Go extension or Delve can automate this mapping computation.

If this is too tricky, the last resort is to use the legacy debug adapter by adding "debugAdapter": "legacy" to the configuration.

For me the legacy option didn't work. Also this fix works for my files but not the dependencies.

Screenshot 2024-03-22 at 16 23 47

from vscode-go.

suzmue avatar suzmue commented on June 10, 2024

We have decided to revert the change of the default back to using the legacy debug adapter for remote attach in v0.41.3 to give us time to address this breakpoint issue from a lack of automated path mapping (#3193). We will try to address the broken breakpoint in the dependency in dlv dap.

from vscode-go.

gopherbot avatar gopherbot commented on June 10, 2024

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

from vscode-go.

gopherbot avatar gopherbot commented on June 10, 2024

Change https://go.dev/cl/580019 mentions this issue: Revert "docs: update the debugging doc about remote mode default adapter"

from vscode-go.

gopherbot avatar gopherbot commented on June 10, 2024

Change https://go.dev/cl/580422 mentions this issue: Revert "docs: update the debugging doc about remote mode default adapter"

from vscode-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.