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

debug: spurious error message about killing process when 'Run without Debug' ends normally #334

Closed
liyisker opened this issue Jul 13, 2020 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@liyisker
Copy link

liyisker commented Jul 13, 2020

Please direct general questions to:

Please review the documentation before filing an issue.
Helpful pages include:

Please answer these questions before submitting your issue. Thanks!

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

  • Run go version to get version of Go
    • <go version go1.14.4 windows/amd64>
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • <1.47.0
      d5e9aa0227e057a60c82568bf31c04730dc15dcd
      x64>
  • Check your installed extensions to get the version of the VS Code Go extension
    • <0.15.1>
  • Run go env to get the go development environment details
	- <set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\liyis\AppData\Local\go-build
set GOENV=C:\Users\liyis\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Go\PATH\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Go\PATH
set GOPRIVATE=
set GOPROXY=https://goproxy.io,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\liyis\AppData\Local\Temp\go-build222914178=/tmp/go-build -gno-record-gcc-switches>

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

{
    "extensions.autoUpdate": false,
    "files.autoSave": "afterDelay",
    "editor.fontSize": 17,
    "go.useLanguageServer": true,
    "workbench.colorTheme": "Ayu Light",
    "python.languageServer": "Pylance",
    "go.coverOnSave": true,
    "go.coverOnSingleTestFile": true,
    "go.coverOnSingleTest": true,
    "go.gocodeAutoBuild": true,
    "go.enableCodeLens": {
        "references": false,
        "runtest": true
    },
}

Describe the bug

A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

  1. Go to 'Run'
  2. Click on 'Run Without Debugging'
  3. Error killing process 7664: Error: Command failed: taskkill /pid 7664 /T /F
    ����: û���ҵ����� "7664"��

Screenshots or recordings

All settings are default, and appear after the 1.5 plug-in version. I have tried to reinstall the system, but it cannot be solved.
Although there is an error message, No problem with function
捕获

@liyisker liyisker changed the title Strange error message, function has no effect Strange error message, No problem with function Jul 13, 2020
@hyangah
Copy link
Contributor

hyangah commented Jul 13, 2020

@liyisker Thanks for the bug report.

It would be clear if we could see the error message. I guess this is a bug related to the process clean up logic added in 1.15.

function killProcessTree(p: ChildProcess): Promise<void> {

When the program terminated normally, this cleanup shouldn't trigger process killing because it's already gone.
I think we can check the exitCode since DefinitelyTyped/DefinitelyTyped#44703 is released.

@hyangah hyangah added NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 13, 2020
@hyangah hyangah changed the title Strange error message, No problem with function debug: spurious error message about killing process when 'Run without Debug' ends normally Jul 13, 2020
@hyangah hyangah added this to the v0.16.0 milestone Jul 13, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/244359 mentions this issue: utils/processUtils: check if the process is running before killing

@golang golang locked and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants