-
Notifications
You must be signed in to change notification settings - Fork 417
Memo: End to end coreclr xunit run and debug scenario
Troy Dai edited this page Apr 27, 2016
·
8 revisions
- User open a solution contains netcoreapp xunit project. Here's an Example.
- Set a break point in one test method.
- Right click the mouse on the test method (on signature or in the method body)
- Choose the "run and debug" option in the context menu.
- Editor start build and run the chosen test method.
- Debugger break at the break point previously set.
- When user right click on a method, editor send request to OmniSharp for test service information.
- The test service information (TSI) endpoint (new) in OmniSharp query the roslyn workspace base on the given cursor location to determine if the position can locate a test.
- The test method is found. Then the TSI respond the editor with information of this test method.
- When user pick the "run and debug" option in the context menu, editor sends request to OmniSharp's test service execution (TSE) endpoint.
- The TSE starts a
dotnet test
in design time mode. (Full dotnet test spec) - The test runner is started and notifies TSE with the process id of the test process. After that it stops and waits for further command.
- The OmniSharp modify the
launch.json
to add configuration to attach to the runner. - [External dependency] The OmniSharp starts the
coreclr-debugger
to attach to the test runner. - [External dependency] The debugger notifies the OmniSharp that it has attached to the test runner.
- The OmniSharp notifies the test runner to start test execution. 11.The debugger will break into the code.