Open
Description
Hey! I have installed delve, and is running fine on my PC. I'm trying to use this config in the launch.json
:
{
"version": "0.2.0",
"configurations": [
{
"name": "Delve",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceRoot}/cmd/web",
"env": {},
"args": [],
"showLog": true
}
],
}
I have the main .go
files inside the cmd/web
folder. The problem is that I have helpers, dbmodels, error handling inside internal
. folder too.
vscode starts the app correctly, but as soon as it requires things from internal or other folders in this structure outside /cmd/web
it starts getting errors. It's like the packages imports are not working correctly. If I put everything inside the /cmd/web
folder I can debug and put breakpoints in the whole app
How do you debug web API's with this structure?
Metadata
Assignees
Labels
No labels
Activity