daveleroy / SublimeDebugger

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol
MIT License
369 stars 42 forks source link

Expanded variables collapse when stepping through code #178

Open jcowgar opened 1 year ago

jcowgar commented 1 year ago

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 commented 1 year ago

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