PowerShell / PowerShell/PowerShellEditorServices
Trying to "wait for debugger" in tests doesn't work
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
There are lines in both LanguageServerTests.cs and DebugServerTests.cs that can be uncommented to enable debugger attachment:
However, trying these in VSCode, I just get a bunch of error dialogs pop up in the machine's native UI and the tests just plough on and fail. I'm guessing this option is meant for Visual Studio usage, rather than VSCode.
I'm thinking we should retire this functionality and instead add a compile-time-conditional block with something like a Console.ReadKey() that reports the process ID of the test runner (that's how I tend to do it at the moment at least).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the debugger-attachment lines in LanguageServerTests.cs and DebugServerTests.cs, starting with the linked LanguageServerTests.cs location. Reproduce the behavior in VSCode and compare the native error dialogs and continued test execution with the intended debugging workflow. Done means the obsolete behavior is retired or replaced with the proposed test-runner pause and process identification, with the tests providing a usable attachment point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell, vscode
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100