chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
You can tell I am new to TypeMock, and just starting to learn and use it.

I am used to running tests from TestDriven.NET. So I wrote a simple test using TypeMock, and it fails if I chose "Run with Debugger" from TestDriven, but succeeds if I do "Run with TypeMock".

My question is, how can I debug a unit test that uses TypeMock? ( whether I am using TestDriven.NEt or not to kick it)

Does the fact that TypeMock is running as a profiler causes any problem of running the debugger at the same time?

asked by phazer (4k points)

2 Answers

0 votes
I just noticed if I put a breakpoint RecordExpectations block, then debugging fails, but if I put breakpoint after the RecordExpectations on a real test code line, debugging works.....
answered by phazer (4k points)
0 votes

Thank you for the report and welcome.

By default TypeMock is mocking all calls made inside the RecordExpectations block, including calls that the debugger issues during the run.
This causes problem when breaking inside that block.

We have been working on changing this, but im not sure where this will be included.

Anyway as long as you refrain from breaking inside the block, debugging using TypeMock should be the same as any other code.

hope this clears things up.
answered by lior (13.2k points)