Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SpecFlow and Testing with the Debugger

We just decided to use SpecFlow in for our unit testing and I created the first scenario.

The tests are running fine,except for one of them and it calls a function in my code.

So obviously that test caught a bug in that function.

I put a breakpoint on the first line of the function which the tests calls and Right Clicked on the Specs project and selected Run With Debugger.

The breakpoint in my function though never gets hit, only the breakpoints in the tests.

So my question is "How do you make SpecFlow run with the Debugger so that I can truly debug my code"

Any suggestions are welcome

Thanks

like image 575
suzi167 Avatar asked Mar 16 '26 21:03

suzi167


1 Answers

This solution is for Visual Studio (version 2019 at the time of writing this answer):

  1. Debug > Options > General
  2. Disable "Enable Just My Code".
like image 113
Xen0byte Avatar answered Mar 19 '26 02:03

Xen0byte