
* dap: support 'Env' attribute for launch requests Env is applied in addition to the delve process environment variables. The env setting is done by calling os.Setenv as early as possible when a Launch request is received. Prior discussion is in https://github.com/go-delve/delve/pull/2582 In Visual Studio Code, setting null for an environment variable in launch.json or tasks.json indicates users want to unset the environment variable. Support the behavior by accepting nil value. * dap: Env field itself can be omitempty * edit comment
14 lines
157 B
Go
14 lines
157 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"runtime"
|
|
)
|
|
|
|
func main() {
|
|
x, y := os.LookupEnv("SOMEVAR")
|
|
runtime.Breakpoint()
|
|
fmt.Printf("SOMEVAR=%s\n%v", x, y)
|
|
}
|