-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Adds a DAP server with support for debugging sway unit tests #5477
Conversation
This PR implements `-o` flags so that we can disable optimizations. This will be useful as we are working towards debugger support and optimizations pollute source map generated. Provide option to the e2e test binary to specify build profile. For tests that have their ABI tested, or rely on their compiled hashes (for deployment), since that changes with build profile, the tests are marked as unsupported for debug profile. (better to test with and have expected results for release than the debug profile). Add testing release profile in CI since the default is now debug. Two tests in `should_fail` that are expected to fail due to overflows are disabled because there's a bug in our IR gen. This is tracked by #5449 --------- Co-authored-by: Vaivaswatha Nagaraj <[email protected]> Co-authored-by: Vaivaswatha N <[email protected]> Co-authored-by: Sophie Dankel <[email protected]>
## Description An issue was reported by @sdankel on #5477 caused by #5557. A segmentation fault would occur when the for loop handling was performed inside the match. This would occur even when that part of the code was not called. Looks like a weird rust issue. ## Checklist - [ ] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. Co-authored-by: Igor Rončević <[email protected]>
forc-plugins/forc-debug/src/server/handlers/handle_breakpoint_locations.rs
Outdated
Show resolved
Hide resolved
Benchmark for 89b3e02Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge work! Very excited for this 🚀 I left some nits and comments here and there but we can merge it as it is and discuss next steps in separate issues/PRs :)
Benchmark for 15ffa7fClick to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Sophie :)
Benchmark for 25eb563Click to view benchmark
|
Great to see this one merged, awesome work ❤️ |
Follow up to #5477 #5477 (comment) --------- Co-authored-by: Vaivaswatha Nagaraj <[email protected]> Co-authored-by: Vaivaswatha N <[email protected]> Co-authored-by: IGI-111 <[email protected]> Co-authored-by: João Matos <[email protected]> Co-authored-by: Joshua Batty <[email protected]> Co-authored-by: Igor Rončević <[email protected]> Co-authored-by: Sudhakar Verma <[email protected]> Co-authored-by: Marcos Henrich <[email protected]> Co-authored-by: jjcnn <[email protected]>
Description
Related FuelLabs/sway-vscode-plugin#166
Adds a DAP server as a new forc plugin,
forc-debug
. This enables a UI debugging experience in IDEs such as VSCode.For now, only debugging forc tests is supported. Users can:
Screenshots
Feb-01-2024.21-37-48.mp4
Feb-01-2024.21-44-37.mp4
Local testing
forc-debug
Limitations
Closes #5394
Checklist
Breaking*
orNew Feature
labels where relevant.