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

Support call stacks in test failures #222126

Merged
merged 7 commits into from
Jul 19, 2024
Merged

Conversation

connor4312
Copy link
Member

This PR implements API and UI support for call stacks in test messages. For an extension who doesn't adopt the new API, nothing changes. When a call stack is available, you get a multi-editor view inspired by the multidiff view. This appears both in the peek and Test Results view.

It is implemented in a way that the call stack itself is generic and can be reused by debug in the future, and it borrows some UI from debug land:

image

The editors are readonly, simple monaco editors. There is never nested scrolling unless the test failure is >1000 lines, until that point the editor expands to fit its content. Clicking on either the title or "go to file" action brings the user to that location from the call stack. The top of the stack (the failure message) has quick actions to re-run the test or debug the test. A very handy flow is setting a breakpoint in the first call frame within the peek and hitting the "debug" button to quickly debug to that failure. Followup actions are shown (see the "fix with copilot" action in the screenshot)

Overall I'm really liking this UI. It does feel kind of heavy to be in a peek, but the utility is there.

alexr00
alexr00 previously approved these changes Jul 19, 2024
@connor4312 connor4312 merged commit ba8fd12 into main Jul 19, 2024
6 checks passed
@connor4312 connor4312 deleted the connor4312/testing-call-stack-v3 branch July 19, 2024 16:23
@connor4312 connor4312 mentioned this pull request Jul 22, 2024
2 tasks
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants