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

unable to debug using Go Nightly #107

Closed
OneOfOne opened this issue May 28, 2020 · 5 comments
Closed

unable to debug using Go Nightly #107

OneOfOne opened this issue May 28, 2020 · 5 comments
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker must be fixed before the next release.
Milestone

Comments

@OneOfOne
Copy link
Contributor

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version devel +6bf2eea62a 2020-05-28 14:43:19 +0000 linux/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.45.1 (and latest inside as of 10 minutes ago as well)
  • Check your installed extensions to get the version of the VS Code Go extension
    • works: 0.14.3, doesn't work: 2020.5.2722
  • Run go env to get the go development environment details
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/oneofone/code/go/bin"
GOCACHE="/home/oneofone/.cache/go-build"
GOENV="/home/oneofone/.config/go/env"
GOEXE=""
GOFLAGS="-gcflags=-c=16"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oneofone/code/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oneofone/code/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/src/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/src/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build413442895=/tmp/go-build -gno-record-gcc-switches"

Share the Go related settings you have added/edited

	"go.buildOnSave": "off",
	"go.vetOnSave": "off",
	"go.lintOnSave": "off",
	"go.useCodeSnippetsOnFunctionSuggest": true,
	"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
	"go.autocompleteUnimportedPackages": true,
	"go.lintTool": "staticcheck",
	"go.editorContextMenuCommands": {
		"toggleTestFile": true,
		"addTags": true,
		"removeTags": true,
		"testAtCursor": false,
		"testFile": false,
		"testPackage": true,
		"generateTestForFunction": true,
		"generateTestForFile": false,
		"generateTestForPackage": true,
		"addImport": false,
		"testCoverage": true,
		"playground": false
	},
	"go.addTags": {
		"tags": "json",
		"options": "json=omitempty",
		"promptForTags": false,
		"transform": "camelcase"
	},
	"go.coverOnSingleTest": true,
	"go.gotoSymbol.includeGoroot": true,
	"go.useLanguageServer": true,
	"go.languageServerExperimentalFeatures": {
		"format": true,
		"diagnostics": true,
		"documentLink": true
	},
	"go.delveConfig": {
		"dlvLoadConfig": {
			"followPointers": true,
			"maxVariableRecurse": 1,
			"maxStringLen": 64,
			"maxArrayValues": 64,
			"maxStructFields": -1
		},
		"apiVersion": 2,
		"showGlobalVariables": true
	},
	"gopls": {
		"env": {},
		"staticcheck": true,
		"analyses": {
			"ST1000": false,
			"ST1003": false
		},
		"codelens": {
			"generate": true,
			"upgrade.dependency": true,
			"test": true
		},
		"usePlaceholders": false,
		"completeUnimported": true,
		"deepCompletion": true
	},

Describe the bug

Using this launch.json config:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Launch",
			"type": "go",
			"request": "launch",
			"mode": "auto",
			"program": "${workspaceFolder}",
			"env": {},
			"trace": "verbose",
			"args": [""]
		}
	]
}

I can't start debugging with the nightly version, same config and settings and everything works perfectly fine with the previous version.

Steps to reproduce the behavior:

  1. Press F5 to start the debugger.
  2. Debug bar shows for a second then disappears.
  3. Debug Console output is empty.
  4. Go debug channel is empty.
  5. The only log that changes is Log (Window) and it shows:
[2020-05-28 15:05:39.020] [renderer1] [error] timeout after 1000 ms: Error: timeout after 1000 ms
    at t.RawDebugSession.handleErrorResponse (file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3061:355)
    at file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3060:679
    at async t.RawDebugSession.shutdown (file:///usr/src/VSCode-linux-x64/resources/app/out/vs/workbench/workbench.desktop.main.js:3058:772)
@stamblerre stamblerre added the Debug Issues related to the debugging functionality of the extension. label May 28, 2020
@stamblerre stamblerre changed the title can't debug with this version unable to debug using Go Nightly May 28, 2020
@stamblerre
Copy link
Contributor

Thanks for the report!

/cc @quoctruong

@stamblerre stamblerre added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 28, 2020
@hyangah hyangah added the release-blocker must be fixed before the next release. label May 29, 2020
@hyangah hyangah added this to the 0.15.0 milestone May 29, 2020
hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 1, 2020
https://go-review.googlesource.com/c/vscode-go/+/234020 added
new dependency on 'glob', so the package.json had to be updated.
The 'glob' module was already in the dev dependency, we couldn't
catch this during testing. Missing this dependency in the packaged
extension caused the debug adapter process to crash when loading.

We need to improve our testing to 1) add end-to-end debug testing,
2) run tests with .vsix.

Fixes golang/vscode-go#107

Change-Id: Icc7b5743def13d877069d836079c71b199b21ec9
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/236037 mentions this issue: package: add missing glob dependency

@hyangah
Copy link
Contributor

hyangah commented Jun 2, 2020

The fix is included in 2020.6.204 released today.
Please test it. Thanks!!!

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/236017 mentions this issue: src/debugAdapter/goDebug: add extra check for remote path inference

gopherbot pushed a commit that referenced this issue Jun 2, 2020
Add check for remote path inference to make sure that this will only get called for remote debugging case.

Updates #45
Updates #107

Change-Id: I7c4c2154013d8631c0b294b124b05eaddf1991f7
GitHub-Last-Rev: 552c403
GitHub-Pull-Request: #147
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236017
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@OneOfOne
Copy link
Contributor Author

OneOfOne commented Jun 2, 2020

Tested it and everything seems to work now, I'll open a new ticket if I run into any bugs, thanks.

@golang golang locked and limited conversation to collaborators Jun 2, 2021
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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker must be fixed before the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants