Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple ui debugging - not working #863

Closed
JCzz opened this issue Oct 30, 2020 · 1 comment
Closed

Simple ui debugging - not working #863

JCzz opened this issue Oct 30, 2020 · 1 comment
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge

Comments

@JCzz
Copy link

JCzz commented Oct 30, 2020


go version go1.15.2 darwin/amd64

code -v
1.50.1
d2e414d9e4239a252d1ab117bd7067f125afd80a
x64

extension version: 0.18.0

go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/<user>/Library/Caches/go-build"
GOENV="/Users/<user>/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/<user>/development/tools/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/<user>/development/tools/power/../gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/<user>/development/tools/power/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3p/8z23nlbs20qf291vlhjy1l0h0000gn/T/go-build349753972=/tmp/go-build -gno-record-gcc-switches -fno-common"

Debug this(yes try it out):

// Demo code for the Box primitive.
package main

import (
	"github.com/gdamore/tcell/v2"
	"github.com/rivo/tview"
)

func main() {
	box := tview.NewBox().
		SetBorder(true).
		SetBorderAttributes(tcell.AttrBold).
		SetTitle("A [red]c[yellow]o[green]l[darkcyan]o[blue]r[darkmagenta]f[red]u[yellow]l[white] [black:red]c[:yellow]o[:green]l[:darkcyan]o[:blue]r[:darkmagenta]f[:red]u[:yellow]l[white:] [::bu]title")
	if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
		panic(err)
	}
}

Error:

API server listening at: 127.0.0.1:11651
panic: open /dev/tty: device not configured

Tried this:
Starting: dlv debug --headless --listen=:2345 --log --api-version=2

and debugging config:

        {
            "name": "Launch remote",
            "type": "go",
            "request": "attach",
            "mode": "remote",
            "remotePath": "<same path>",
            "port": 2345,
            "host": "127.0.0.1",
            "cwd": "<same path>",
        }

This works out ot the box in Goland, it would be really helpfull to get it working in VSCode.
Thanks

@hyangah hyangah added the Debug Issues related to the debugging functionality of the extension. label Oct 30, 2020
@hyangah
Copy link
Contributor

hyangah commented Oct 30, 2020

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants