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: halt on connect #3514

Merged
merged 6 commits into from
Feb 13, 2023
Merged

debug: halt on connect #3514

merged 6 commits into from
Feb 13, 2023

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Feb 12, 2023

debug: use s:isReady() consistently
debug: set default value for current goroutine indicator

Sometimes execution will be halted at a time when there is no current
goroutine (e.g. the process is sleeping). Default the current goroutine
indicator so that trying to prepend the current goroutine to the list
does not cause an error.

debug: halt on connect

Always halt on connect so that :GoDebugConnect will halt the
application and set up breakpoints even when delve was started with
--continue.

It is safe to halt multiple times, so it won't matter what state the
debugger is in when halt is called.

debug: change function names for readability

Change function names for readability so that it is easier to reason
about what the code is doing.

  • start_cb() -> create_layout()
  • stack_cb() -> update_windows()
debug: s:list_breakpoints -> s:list_breakpointsigns

Rename s:list_breakpoints to s:list_breakpointsigns to disambiguate
whether the breakpoints as understood by the debugger, dlv, or or the
signs placed in the editor are returned.

debug: add breakpoint synchronization

Synchronize breakpoints whenever connecting to the debugger in case it
was started in multiclient mode and already has breakpoints set.

Fixes #3508

Sometimes execution will be halted at a time when there is no current
goroutine (e.g. the process is sleeping). Default the current goroutine
indicator so that trying to prepend the current goroutine to the list
does not cause an error.
@bhcleek bhcleek added this to the vim-go v1.29 milestone Feb 12, 2023
Always halt on connect so that :GoDebugConnect will halt the
application and set up breakpoints even when delve was started with
--continue.

It is safe to halt multiple times, so it won't matter what state the
debugger is in when halt is called.
Change function names for readability so that it is easier to reason
about what the code is doing.
* start_cb() -> create_layout()
* stack_cb() -> update_windows()
Rename s:list_breakpoints to s:list_breakpointsigns to disambiguate
whether the breakpoints as understood by the debugger, dlv, or or the
signs placed in the editor are returned.
Synchronize breakpoints whenever connecting to the debugger in case it
was started in multiclient mode and already has breakpoints set.
@bhcleek bhcleek merged commit 8f27aa5 into fatih:master Feb 13, 2023
bhcleek added a commit that referenced this pull request Feb 13, 2023
@bhcleek bhcleek deleted the debug/connect/halt branch February 13, 2023 04:24
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.

:GoDebugConnect unable to set breakpoints on running process
1 participant