porente
porente

Reputation: 443

steps to debug a dll used in an mvc 5 project

I have a dll project and an mvc 5 project

I want to debug the dll project when it is used in the mvc project

I already built the dll project in debug mode and they work if I put these generated debug files directly in the bin folder of the mvc 5 project

but now I want to debug the dll code when the mvc project calls it, without moving files around, what are the exact steps to do this?

Upvotes: 0

Views: 783

Answers (2)

porente
porente

Reputation: 443

build the dll project in debug mode, take the generated files and put them in the bin folder of the MVC project

In my case the dll uses c++ code -> unmanaged code, so in VS MVC project

right click project name->properties->web->Debuggers check the "Native code"

save the project, put the breakpoint, run in debug mode, VS will show "debugging information for iisexpress.exe cannot be found..." continue debugging

Now I can step inside the dll code

Upvotes: 2

Dai
Dai

Reputation: 155728

Open VS or your debugger and attach to w3wp.exe and ensure you have your DLL's symbols loaded. That's all you need to do.

Upvotes: 0

Related Questions