Skip to content

Launch.json are not work for golang at code-server 3.12 #4576

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

Closed
HuJK opened this issue Dec 2, 2021 · 4 comments
Closed

Launch.json are not work for golang at code-server 3.12 #4576

HuJK opened this issue Dec 2, 2021 · 4 comments
Milestone

Comments

@HuJK
Copy link

HuJK commented Dec 2, 2021

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: x86
  • code-server --version: code-server 3.12

Steps to Reproduce

  1. Install code-server 3.12
  2. Install latest go extension and golang 1.17
  3. Create a .vscode/launch.json with following content
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Go",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}",
            "env": {"AAA":"BBB"},
            "args":["-mode","modeA"]
        }
    ]
}
  1. Create a main.go with following content
package main

import (
	"flag"
	"fmt"
	"os"
)

var (
	mode = flag.String("mode", "", "Running mode. [modeA|modeB|modeC]")
)

func main() {
	flag.Parse()
	env_aaa := os.Getenv("AAA")
	fmt.Printf("Mode: %s\n", *mode)
	fmt.Printf("Env AAA: %v\n", env_aaa)
}
  1. run command go mod init go-test

Expected

You can simply get this result(expected behavior) by switching code-server 3.12 to 3.11
So, I think this is a bug

image

Actual

program,args,env are not loaded

image

Logs

[2021-12-02T18:38:35.361Z] debug setting up vs code...
[2021-12-02T18:38:35.362Z] debug vscode got message from code-server {"type":"init"}
[2021-12-02T18:38:35.510Z] debug setting up vs code...
[2021-12-02T18:38:35.511Z] debug vscode got message from code-server {"type":"init"}
[2021-12-02T18:38:37.008Z] debug setting up vs code...
[2021-12-02T18:38:37.008Z] debug vscode got message from code-server {"type":"init"}
[2021-12-02T18:38:38.004Z] debug vscode got message from code-server {"type":"socket"}
[2021-12-02T18:38:38.005Z] debug protocol Initiating handshake... {"token":"c70f2893-38ca-47c0-9cf6-51b7330c58f5"}
[2021-12-02T18:38:38.015Z] debug protocol Handshake completed {"token":"c70f2893-38ca-47c0-9cf6-51b7330c58f5"}
[2021-12-02T18:38:38.015Z] debug management Connecting... {"token":"c70f2893-38ca-47c0-9cf6-51b7330c58f5"}
[2021-12-02T18:38:38.016Z] debug vscode 1 active management connection(s)
[2021-12-02T18:38:38.319Z] debug got latest version {"latest":"3.12.0"}
[2021-12-02T18:38:38.319Z] debug comparing versions {"current":"3.12.0","latest":"3.12.0"}
[2021-12-02T18:38:38.370Z] debug vscode got message from code-server {"type":"socket"}
[2021-12-02T18:38:38.370Z] debug protocol Initiating handshake... {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.591Z] debug protocol Handshake completed {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.592Z] debug exthost Connecting... {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.592Z] debug exthost Getting NLS configuration... {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.592Z] debug vscode 1 active exthost connection(s)
[2021-12-02T18:38:38.592Z] debug exthost Spawning extension host... {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.596Z] debug exthost Waiting for handshake... {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.978Z] debug exthost Handshake completed {"token":"66575062-25ee-406f-aa66-55e725676c98"}
[2021-12-02T18:38:38.978Z] debug exthost Sending socket {"token":"66575062-25ee-406f-aa66-55e725676c98"}

Screenshot

Notes

This issue can be reproduced in VS Code: No
This issue not happen in VS Code 1.62.3

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 6, 2021

I believe this is a duplicate of #4221

@HuJK
Copy link
Author

HuJK commented Dec 8, 2021

Not sure. In this case, the debugger started, but all options are not loaded.

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 8, 2021

Ahhh okay! I guess we'll leave this open until we investigate further. Thanks for clarifying!

@jsjoeio jsjoeio added the needs-investigation This issue needs to be further investigated label Dec 8, 2021
@jsjoeio jsjoeio added this to the On Deck milestone Dec 8, 2021
@stale
Copy link

stale bot commented Jun 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Jun 6, 2022
@stale stale bot closed this as completed Jun 11, 2022
@code-asher code-asher removed needs-investigation This issue needs to be further investigated stale labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants