You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday we merged support for go1.9 into Delve, users that use delve with go1.9 will need to update. There are no backwards incompatible changes so this frontend should keep working normally with the updated delve.
However there are two things that delve frontends can do for a better debugging experience with go 1.9:
If you are building the binaries passed to delve instead of letting delve call the compile make sure to pass -a to go build if the version of go is 1.9. If -a isn't passed the compiler will pick up cached packages that might contain optimized code. This will probably change again in 1.10 when the go tool is expected to become intelligent enough to not pick up cached optimized artifacts for a non-optimized build.
We have added a new Flags field to Variable values returned by API call ListLocalVars. It's a bit field. Variables that are in scope but shadowed by another variable of the same name will have the VariableShadowed flag set.
For example:
func testfunc() {
for i := 0; i < 10; i++ {
for i := 0; i < 10; i++ {
fmt.Println(i) // <- debugger is stopped here
}
}
}
In this situation ListLocalVars will return two variables, both named i. The first one of those (which is the one that belongs to the outer for loop) will have the VariableShadowed flag set, the other one won't
Variables that have the VariableShadowed flag set should be either omitted from the locals view or shown in a distinct way.
The text was updated successfully, but these errors were encountered:
Yesterday we merged support for go1.9 into Delve, users that use delve with go1.9 will need to update. There are no backwards incompatible changes so this frontend should keep working normally with the updated delve.
However there are two things that delve frontends can do for a better debugging experience with go 1.9:
If you are building the binaries passed to delve instead of letting delve call the compile make sure to pass
-a
togo build
if the version of go is 1.9. If-a
isn't passed the compiler will pick up cached packages that might contain optimized code. This will probably change again in 1.10 when the go tool is expected to become intelligent enough to not pick up cached optimized artifacts for a non-optimized build.We have added a new Flags field to Variable values returned by API call ListLocalVars. It's a bit field. Variables that are in scope but shadowed by another variable of the same name will have the VariableShadowed flag set.
For example:
In this situation ListLocalVars will return two variables, both named
i
. The first one of those (which is the one that belongs to the outer for loop) will have the VariableShadowed flag set, the other one won'tVariables that have the VariableShadowed flag set should be either omitted from the locals view or shown in a distinct way.
The text was updated successfully, but these errors were encountered: