mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 20:53:42 +08:00
service/dap: support evaluate requests with expressions and calls (#2185)
* Support evaluate request * Fix failing tests * Call support * Remove debugger.CurrentThread() that got accidentally reintroduced during merge * Address review comments * Function to stringify stop reason * Add resetHandlesForStop * Handle stop inside call * More tests * Address review comments * Check all threads to determine if call completed * Fix test * Fix test * Fix test * Address review comments Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
This commit is contained in:
@ -644,6 +644,7 @@ func TestIssue387(t *testing.T) {
|
||||
}
|
||||
|
||||
func listIsAt(t *testing.T, term *FakeTerminal, listcmd string, cur, start, end int) {
|
||||
t.Helper()
|
||||
outstr := term.MustExec(listcmd)
|
||||
lines := strings.Split(outstr, "\n")
|
||||
|
||||
@ -688,10 +689,10 @@ func TestListCmd(t *testing.T) {
|
||||
withTestTerminal("testvariables", t, func(term *FakeTerminal) {
|
||||
term.MustExec("continue")
|
||||
term.MustExec("continue")
|
||||
listIsAt(t, term, "list", 25, 20, 30)
|
||||
listIsAt(t, term, "list 69", 69, 64, 70)
|
||||
listIsAt(t, term, "frame 1 list", 62, 57, 67)
|
||||
listIsAt(t, term, "frame 1 list 69", 69, 64, 70)
|
||||
listIsAt(t, term, "list", 27, 22, 32)
|
||||
listIsAt(t, term, "list 69", 69, 64, 73)
|
||||
listIsAt(t, term, "frame 1 list", 65, 60, 70)
|
||||
listIsAt(t, term, "frame 1 list 69", 69, 64, 73)
|
||||
_, err := term.Exec("frame 50 list")
|
||||
if err == nil {
|
||||
t.Fatalf("Expected error requesting 50th frame")
|
||||
|
||||
Reference in New Issue
Block a user