Koss645
Koss645

Reputation: 44

How to debug class library in .NET

I have a solution with two projects

  1. My project PortCloud
  2. Library Renci.SshNet with source code

I reference from project PortCloud to Renci.SshNet library

When I try to run/debug solution I get exception error in library and application crashes.

Trouble is that I do not see exception in debugger. I would like to see line in library where this is happening and why. What am I doing wrong? Why debugger do not automatically open problematic file and show me exact error?

Update Visit http://screencast.com/t/1aIUVX27 video for seeing what I am actually doing in Visual Studio

Upvotes: 1

Views: 6199

Answers (2)

Caner
Caner

Reputation: 873

You can add a new unitest project. Then you can add it as a reference to the project and debug it.

Upvotes: 0

Anand
Anand

Reputation: 14935

Add both the project to your visual studio solution

  1. From project, go to reference
  2. Add project Reference
  3. Add the project which you want to debug.

Run F5 to debug. F10 to step over and F11 to step in to functions

More details for debugging here

Upvotes: 1

Related Questions