Skip to content

Cannot debug gitea in vscodium + default vscode-go 0.30.0 config #18394

Closed
@pboguslawski

Description

@pboguslawski

Gitea Version

1.16

Git Version

No response

Operating System

No response

How are you running Gitea?

Compilation from source.

Database

No response

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

When you try to compile gitea in vscodium with current vscode-go extension version 0.30.0 using instructions from

https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md

debug binary will be build in /tmp not in ${workspaceRoot} and page http://127.0.0.1:3000/ will display only

Unable to find status/500 template

and debug console will contain errors like

2022/01/24 19:02:18 ...ers/common/logger.go:21:1() [I] Started GET / for 127.0.0.1:34106
2022/01/24 19:02:18 ...s/context/context.go:206:HTML() [E] Render failed: html/template: "install" is undefined
2022/01/24 19:02:18 ...s/context/context.go:290:PlainTextBytes() [E] PlainTextBytes: Unable to find status/500 template
2022/01/24 19:02:18 ...ers/common/logger.go:30:1() [I] Completed GET / 500 Internal Server Error in 469.837µs

Problem is caused probably by new debugger mode used in vscode-go extension (dlv-dap).

Workaround that seems to work is to turn on legacy mode by adding

    "go.delveConfig": {
        "debugAdapter": "legacy",
    }

to settings.json.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions