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

Improve debugger stability #457

Merged
merged 13 commits into from
Jan 14, 2021
Merged

Improve debugger stability #457

merged 13 commits into from
Jan 14, 2021

Conversation

lukaszsamson
Copy link
Collaborator

This PR introduces stability and reliability improvements to debugger.

  • I added some safe checking in the debugger code
  • Made the server not crash when handling invalid request (e.g. when threadId, variablesReference or frameId is not found)
  • Adds handling of :int module crashes. Some operations crash with MatchError when the operation results in a step out of interpreted code
  • Made debugger aware of process exits. If a paused process dies now the debugger is notified and able to send thread event with reason exited. vscode UI is no longer stuck in paused state
  • Refactored and added tests to OutputDevice. The module now now more closely adheres to erlang I/O protocol (see https://erlang.org/doc/apps/stdlib/io_protocol.html). Most importantly:
    • handling of encoding was broken - no care was taken to check if data is unicode or latin1
    • in case of multiple requests the protocol expects only one response and that processing is stopped on first error - all responses was returned

Fixes #452
Fixes #454
Fixes #455
Fixes #456

Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an impressive list of fixes ❤️

@@ -7,7 +7,7 @@ defmodule ElixirLS.Debugger.Output do
are sent with sequence numbers that are unique and sequential, and includes client functions for
sending these messages.
"""
import ElixirLS.Utils.WireProtocol, only: [send: 1]
alias ElixirLS.Utils.WireProtocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 💯

@axelson axelson merged commit 4ae6e22 into master Jan 14, 2021
@axelson axelson deleted the ls-improve-debugger-stability branch January 14, 2021 18:21
lukaszsamson added a commit that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants