Closed john-swallow-cenduit closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I created PR https://github.com/mmanela/chutzpah/pull/802 to resolve this issue.
I only tested when debugging using the Visual Studio Test Explorer.
Summary
Debugging from the Test Explorer with Server mode turned on almost always fails. It looks like the test harness is completing and the web server (setup by Chutzpah) is being closed BEFORE Visual Studio has time to get in and launch and connect to a browser.
Running debug from the Context Menu "Run Chutzpah with Debugger" works just fine in the exact same code base and configuration.
I'm guessing this is about how the lifecycle of the Web Server is controlled but I would naturally expect the two ways of debugging to work in the same way (and the following would appear to agree: https://github.com/mmanela/chutzpah/wiki/Debugging-Unit-Tests).
Details
Basic steps in any VS solution where Server Mode is enabled (explicitly or implicitly through the use of Chrome of JsDom engines):
Repo: https://github.com/john-swallow-cenduit/ChutzpahDebugIssue
Expected: Browser starts. Jasmine page is loaded. Breakpoint is hit. Actual: Most of the time it will launch an IE window and throw up a "Cannot reach this page" error.
Full details of all versions used are in the readme.md of the repo but the Chutzpah versions in use:
I've included a bunch more observations in the readme.md in the repo but I have attempted to draw out just the pertinent ones here for the sake of brevity.