SublimeDebugger icon indicating copy to clipboard operation
SublimeDebugger copied to clipboard

Expanded variables collapse when stepping through code

Open jcowgar opened this issue 2 years ago • 1 comments

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.

jcowgar avatar Sep 22 '22 04:09 jcowgar

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 https://github.com/microsoft/vscode/issues/93230

daveleroy avatar Sep 24 '22 07:09 daveleroy