mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 142 forks source link

Not able to debug .js test files #809

Open pallz12 opened 2 years ago

pallz12 commented 2 years ago

Hi, I have downloaded both Chutzpah Test Explorer Adapter and Chutzpah Test Context menu and using VS Professional 2019 . I am able to run .js test files and debug them on the Chrome browser via Chutzpah but am not able to debug them in VS. Any suggestions? Here is my chutzpah.json file: { "BrowserArguments": { "chrome": "--allow-file-access-from-files --allow-file-access" }, "Engine": "Chrome", "Framework": "jasmine", "FrameworkVersion": "3.5.0"

}

And here is my error:

Error: System.InvalidOperationException: Unable to debug the process: Visual Studio debugger not found. at Chutzpah.VS.Common.DteHelpers.DebugAttachToProcess(Int32 subjectProcessId, String debugEngine) at Chutzpah.VS.Common.VsDebuggerTestLauncher.LaunchTest(TestContext testContext) at Chutzpah.TestRunner.<>c__DisplayClass39_0.b__0(TestContext testContext)

KyleKolander commented 2 years ago

I'm experiencing the same thing, being unable to debug, using Visual Studio Enterprise 2022 (64-bit) Version 17.1.0. I have installed version 4.4.12 of both the Chutzpah Test Context Menu 2022 and Chutzpah Test Explorer Adapter 2022 extensions. In case it matters, I run Visual Studio as Administrator.

I can run the tests without issue, but can't debug. I get the same error as @pallz12. I looked through your code and can see the error is here: Unable to debug the process: Visual Studio debugger not found. Seems to be an issue with the DTE Interface.

I followed the steps on the Debugging In Visual Studio wiki page. Note that I don't have Internet Explorer installed anymore, but Edge is installed, so there are still Internet Options (see below). It looks like the wiki pages are out of date (last updated at least 5 or 6 years ago). Could it be that I'm missing some configuration step(s) because I followed old documentation?

image

@mmanela - thank you for creating these extensions and updating them to work with Visual Studio 2022! I'm sure you're really busy, but it would be very much appreciated if you could help figure out how to debug in Visual Studio.