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

debug: support delve's rewind command #110

Closed
ramya-rao-a opened this issue May 28, 2020 · 8 comments
Closed

debug: support delve's rewind command #110

ramya-rao-a opened this issue May 28, 2020 · 8 comments
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FeatureRequest FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 28, 2020

This is a request to add integration to the rewind command in delve. Please see microsoft/vscode-go#1529 for details where there are discussions on the implementation as well as links to past PRs that attempted to add this feature

Corresponding PR in this repo: #89

@ramya-rao-a ramya-rao-a added Debug Issues related to the debugging functionality of the extension. FeatureRequest HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. labels May 28, 2020
@stamblerre stamblerre changed the title Support for delve's rewind command debug: support for delve's rewind command Jun 3, 2020
@stamblerre stamblerre changed the title debug: support for delve's rewind command debug: support delve's rewind command Jun 3, 2020
@gopherbot gopherbot added this to the Untriaged milestone Apr 8, 2021
@hyangah hyangah modified the milestones: Untriaged, Backlog Apr 14, 2021
@polinasok
Copy link
Contributor

polinasok commented Sep 9, 2021

The rewind option is available in two cases:

  1. [DONE] Replay regenerated rr trace:
"request": "launch",
"mode": "replay",
"traceDirPath":"path/to/rr/trace",

Tracked under #1243, which has been fixed.

  1. [TDB] Build/take binary, generate rr trace and replay:
"request": "launch",
"mode": "debug", // or "exec" or "test"
"backend":"rr",

Dlv-dap does support backend attributes, but we still need to verify that this works end-to-end on Linux.

@polinasok
Copy link
Contributor

I am able to launch with "rr" backend. The trace is generated and the Step Back button shows up. Unfortunately, there appears to be some kind of compatibility issue with rr and my workstation not related to dlv dap - the recording exits before anything runs, so I don't hit any breakpoints and can't test the button itself.

@lggomez Could you confirm please that this works for you?

"request": "launch",
"mode": "debug", // or "exec" or "test"
"backend":"rr",

@lggomez
Copy link
Contributor

lggomez commented Sep 12, 2021

@polinasok Is this on main branch? I'm using launch config "mode": "replay" which works as intended using the latest version of the extension

My setup is the following

golang.go v0.27.2

.rr version 5.3.0

Delve Debugger
Version: 1.7.1
Build: $Id: 3bde2354aafb5a4043fd59838842c4cd4a8b6f0b $

Version: 1.60.0
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:43:02.136Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-34-generic snap

uname: 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@polinasok
Copy link
Contributor

polinasok commented Sep 21, 2021

@polinasok Is this on main branch? I'm using launch config "mode": "replay" which works as intended using the latest version of the extension

@lggomez No I don't mean "replay" mode. That one takes a pre-generated file. If you add "rr" backend to any other launch mode it should run and record for you and then replay that recording.

@polinasok
Copy link
Contributor

FYI @rogchap @t-bast who were on the original issue microsoft/vscode-go#1529

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/359398 mentions this issue: package.json: allow 'rr' as a valid delve backend

gopherbot pushed a commit that referenced this issue Oct 28, 2021
Updates #110

Change-Id: I820c96bd30bf830fe0d13497f9bcc7f200d8c9bc
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/359398
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Polina Sokolova <polina@google.com>
@polinasok
Copy link
Contributor

@hyangah Could you please verify that rewind buttons works as expected when hitting a breakpoint with the following configuration on Linux?

"request": "launch",
"mode": "debug", // or "exec" or "test"
"backend":"rr",

@hyangah
Copy link
Contributor

hyangah commented Dec 3, 2021

https://twitter.com/belbaoverhill/status/1466911997174464513 :-)

Thanks @lggomez @polinasok @aarzilli @derekparker

@hyangah hyangah closed this as completed Dec 3, 2021
@hyangah hyangah removed this from the Unplanned milestone Dec 9, 2021
@hyangah hyangah added this to the v0.30.0 milestone Dec 9, 2021
@golang golang locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FeatureRequest FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Projects
None yet
Development

No branches or pull requests

5 participants