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

watch: add support for running delve while watching #165

Merged
merged 4 commits into from
Nov 28, 2020

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Nov 21, 2020

Pressing d in watch mode will rerun the tests for the previous event using dlv test. Breakpoints can be set either from the prompt or by adding runtime.Breakpoint() in the source.

This commit fixes a bug where attempting to redo after a debug run would run tests in the wrong
package.

The problem was that debug would create a test binary in the working directory. The creation of
that file would trigger an event. The event wouldn't be handled, but it still caused
prevPath to be updated.

By moving the storage of the lastPath to handler it removes the need for the Save method on
redoHandler, and keeps the tracking of the previous run details (last time.Time) together.
@dnephin dnephin merged commit fcc882a into gotestyourself:main Nov 28, 2020
@dnephin dnephin deleted the watch-debug-delve branch November 28, 2020 19:23
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

Successfully merging this pull request may close these issues.

None yet

1 participant