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

Expanded variables collapse when stepping through code #178

Open
jcowgar opened this issue Sep 22, 2022 · 1 comment
Open

Expanded variables collapse when stepping through code #178

jcowgar opened this issue Sep 22, 2022 · 1 comment

Comments

@jcowgar
Copy link

jcowgar commented Sep 22, 2022

Given the simple program:

package main

import "fmt"

type Person struct {
	Name string
	Age int
}

func main() {
	p := Person{Name:"John", Age:20}
	name := p.Name
	p.Age = p.Age * 2

	fmt.Printf("Hello, %s!\n", name)
}

When setting a break point on name := p.Name. When the breakpoint hits, I expand the p structure in the Variables tab of the debugger. It shows Name and Age. However, when I press Step Over, the code pointer moves, but the expanded p structure is collapsed. I have to expand it with each code line processed.

It would be nice if the debugger kept the structure expanded while walking through the code.

@daveleroy
Copy link
Owner

This is on my list of things but its kind of a pain to try and cross reference variables between stopped events so they can be expanded.

Here is a ticket about this for vscode microsoft/vscode#93230

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

2 participants