Skip to content

Support call stacks in test failures - #222126

Merged
Connor Peet (connor4312) merged 7 commits into
mainfrom
connor4312/testing-call-stack-v3
Jul 19, 2024
Merged

Connor Peet (connor4312) merged 7 commits into
mainfrom
connor4312/testing-call-stack-v3

Conversation

@connor4312

Copy link
Copy Markdown
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.

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