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 Protocol Enhancements #107

Merged
merged 80 commits into from Oct 16, 2023
Merged

Debug Protocol Enhancements #107

merged 80 commits into from Oct 16, 2023

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Oct 6, 2022

Adds significant debug protocol enhancements/improvements/stability.

  1. Created a debug protocol server, which emulates the server-side of Roku's binary debug protocol. This vastly simplifies the unit test experience, as we can now control both the client and the server side, mocking both.

The downside is that these are not on-device tests, but the majority of our logic can be tested in this fashion.

Each ProtocolRequest and ProtocolResponse class will support loading from json, loading from a buffer, and serializing to a buffer. This makes the binary structures for client and server first-class citizens of the project, and simplifies the unit test experience as well.

This server can also be used to provide actual debugging experiences in a brs emulator (if someone ever gets around to implementing that...).

  1. Fix several performance and stability issues in the debug protocol

  2. Add compile error support from the debug protocol and improve the general compile error UI flow.

  3. Fix several issues where the debug session doesn't cleanly clean itself up, resulting in the vscode extension wasting many CPU cycles

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 4961675. You can download the .vsix here and then follow these installation instructions.

* Discard breakpoints that got deleted before verified

* Add log entry for when we removed the breakpoint

* disable coveralls publishing
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on bb376a6. You can download the .vsix here and then follow these installation instructions.

* Discard breakpoints that got deleted before verified

* Add log entry for when we removed the breakpoint

* disable coveralls publishing

* Improve logging output for request/response/update

* increase timeout for DebugProtocolAdapter tests
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 452f1b8. You can download the .vsix here and then follow these installation instructions.

* More graceful shutdown

* remove unnecessary test
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on b119986. You can download the .vsix here and then follow these installation instructions.

* More graceful shutdown

* remove unnecessary test

* Don't store failed exec commands
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on ebf9a52. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on fe40a40. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 1676d3a. You can download the .vsix here and then follow these installation instructions.

TwitchBronBron and others added 4 commits May 31, 2023 14:18
* support marking breakpoints as `pending`

* Implement `deleteBreakpoint` for bp manager

* retain bp "pending" status if bp is deleted

* Fix breakpoint deviceId issues

* Only run single breakpoint sync at a time

* BreakpointRef support

* Fix failing test

* Prevent tests from stalling out

* Resurrect breakpoints when device failed to remove

* Fix bp resurrection

* Make the bp events more generic

* Add unit test for removing failed add breakpoints

* Update changelog for v0.18.9

* 0.18.9

* Update changelog for v0.18.10

* 0.18.10

* Fix crash by using postman-request (#151)

* Update changelog for v0.18.11

* 0.18.11

* Fix `file already exists` error and hung process (#152)

* Remove axios in favor of postman-request (#153)

* Update changelog for v0.18.12

* 0.18.12

* File logging (#155)

* Adds FileLoggingManager

* Fix missing cwd

* Update changelog for v0.19.0

* 0.19.0

* Merge branch 'master' of https://github.com/rokucommunity/roku-debug into DebugProtocolServer

* Simplified the relay session test

* Move @types/request to deps to fix d.bs files

* Update changelog for v0.19.1

* 0.19.1

* Support sgrendezvous through ecp (#150)

* A lot of foundational work

* Update testing

* Push some of the more foundational functions

* Add minversion function and await to an async function

* Ending curly bracket

* Add types

* Add add launch config info to device info

* Capture rendezvous

* Wrap up rendezvous support

* delete log

* Make code more easily testable

* Change a few things around how to handle the rendezvous data

* test pingEcpRendezvous

* Fix bug with telnet and ecp mismatch

* Drive usage based on launch config setting instead of device.
Move rendezvous events out of adapters.

---------

Co-authored-by: Bronley Plumb <bronley@gmail.com>

* Update changelog for v0.20.0

* 0.20.0

* Fix rendezvous crash (#156)

* Fix timing bugs during rendezvous tracking startup

* Only emit rendezvous data if new data was received

* Update changelog for v0.20.1

* 0.20.1

* Bump word-wrap from 1.2.3 to 1.2.4 (#157)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update changelog for v0.20.2

* 0.20.2

* Add option to delete dev channel before install (#158)

* Update changelog for v0.20.3

* 0.20.3

* When a breakpoint fails to delete because of error NOT_STOPPED. Store
the breakpoints and delete later.

* Store the srcHash and destHash as different hashes
Create a mapping of destHash to breakpoint deviceId

* Unit test fixes

* Fix another test

* Remove more bp resurrection tests

* Always set deviceId for bps, even on error

* Remove unnecessary cache and resurrection references

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Milap Naik <milapnaik@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christian Holbrook <cholbrook@fubo.tv>
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 8267dc5. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 4309027. You can download the .vsix here and then follow these installation instructions.

@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on 77be661. You can download the .vsix here and then follow these installation instructions.

TwitchBronBron and others added 2 commits October 11, 2023 09:33
* support marking breakpoints as `pending`

* Implement `deleteBreakpoint` for bp manager

* retain bp "pending" status if bp is deleted

* Fix breakpoint deviceId issues

* Only run single breakpoint sync at a time

* BreakpointRef support

* Fix failing test

* Prevent tests from stalling out

* Resurrect breakpoints when device failed to remove

* Fix bp resurrection

* Make the bp events more generic

* Add unit test for removing failed add breakpoints

* Merge branch 'master' of https://github.com/rokucommunity/roku-debug into DebugProtocolServer

* Simplified the relay session test

* When a breakpoint fails to delete because of error NOT_STOPPED. Store
the breakpoints and delete later.

* Store the srcHash and destHash as different hashes
Create a mapping of destHash to breakpoint deviceId

* Unit test fixes

* Fix another test

* Remove more bp resurrection tests

* Always set deviceId for bps, even on error

* Add better suppport for compile error output

* Changes that need to be verified

* Small comments, fix leftover merge items

* Small stability tweaks

* Properly shut down the adapter on debugger close

* Fix telnet complib error detection

* Shut down if compile error exists when using debug nav commands

* send responses earlier to feel more responsive

* Dedupe compile errors. add diagnostic source

* better diagnostic source handling

* Fix tests

* Simplify the response sending logic

---------

Co-authored-by: Christian Holbrook <cholbrook@fubo.tv>
@rokucommunity-bot
Copy link

Hey there! I just built a new version of the vscode extension based on bbc928b. You can download the .vsix here and then follow these installation instructions.

@TwitchBronBron TwitchBronBron changed the title Debug protocol server Debug Protocol Enhancements Oct 16, 2023
@TwitchBronBron TwitchBronBron merged commit d6afe4b into master Oct 16, 2023
5 checks passed
@TwitchBronBron TwitchBronBron deleted the DebugProtocolServer branch October 16, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-vsix PRs with this tag will trigger a vsix build on vscode-brightscript-language for every push
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant