If you have bindings in an external assembly and one of those bindings is a static class, all binding classes alphabetically after that class get dropped after you start running debugger.
Example:
class DatabaseSteps
class HttpSteps
static class InfrastructureSteps
class RequestSteps
class ResponseSteps
In this example, when you first launch Rider, all bindings will be loaded, and no missing step definition highlighting will be present. After running tests, it will continue to be the case. The moment you run tests with debugger, step definitions from RequestSteps and ResponseSteps will disappear, and warning lines for missing definitions will appear. The tests will pass as the definitions will still be picked up by the test runner and it's only a visual bug.
To work around this, I removed the static keyword and the plugin started to behave normally.
It would help to provide a repro and maybe check the logs too (see backend.log), the error you describe look like an exception during the update of the cache (interrupting the process in the middle)
Rider 2022.2.3 SpecFlow for Rider 1.14.2
If you have bindings in an external assembly and one of those bindings is a static class, all binding classes alphabetically after that class get dropped after you start running debugger.
Example:
In this example, when you first launch Rider, all bindings will be loaded, and no missing step definition highlighting will be present. After running tests, it will continue to be the case. The moment you run tests with debugger, step definitions from
RequestSteps
andResponseSteps
will disappear, and warning lines for missing definitions will appear. The tests will pass as the definitions will still be picked up by the test runner and it's only a visual bug.To work around this, I removed the
static
keyword and the plugin started to behave normally.