Step-into Class Library from VWD 2005 problem.

M

Med

Hi,

I use Visual C# Express 2005 and Visual Web Developer Express 2005.

In my Visual C# Express 2005 Solution, I have following two class library
projects:
_ DataAccess (Namespace name: DataAccess)
_ SystemLibrary (Namespace name: SystemLibrary)

which they both build in their own "bin\Release\" folders.

In my Visual Web Developer Express 2005 Solution, I have two web projects of
WebApp1 and WebApp2 which are both have referenced to DataAccess.dll and
SystemLibrary.dll, in Class library "bin\Release\" folders.

Problem:
I can debug and step-into SystemLibrary class from VWD Express, but cannot
debug/step-into DataAccess!
Both class library properties are identical with public static methods.
Even forcing class library projects to build into /bin/debug folders and
pointing web app references to them, not helping. Bare in mind that
DataAccess has a reference to SystemLibrary.

Why can I not step-into the DataAccess code?

Thanks for your time.

Kind Regards

Med
 
C

Cowboy \(Gregory A. Beamer\)

It is a limitation of the Express products.

There are a couple of ways "around" this, depending on what you want to do.

1. Create test stubs and debug the libraries using nUnit. With C# Express,
you will have limitations to where you can place the tests, of course, but
you can mark the tests debug only so they do not compile into the assembly
when you release. This does not solve the step into issue, but will give you
the means to properly test your code.

2. Use another debugger. There are free debuggers that ship with the .NET
Framework. You can find details on using them in the bugslayer column of
MSDN and on the web. I am not going to jump too heavy into this route right
now, as the debuggers are harder to use than the Visual Studio debugger and
it is easier to set up nUnit tests (short learning curve and then you are
flying).

As you can probably tell, I recommend unit test frameworks. I have used
nUnit in the past, but someone just suggested mbUnit, which I am going to
check out. :)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
M

Med

Hi Gregory,

Thanks for your time and suggestion. However I discovered the source of my
problem which was calling a DataAccess method in my Session_Start of
Global.asax, to populate a dataset in my session object! As you can imagine
it took me hours to discover it. I still don't undrestand why calling a dll
assmebly in Session_Start prevent the debugger to step-into that class
library code!

Now I can debug and step-into all my c# class libraries from Visual Web
Developer Express IDE.


Regards


Med
 
C

Cowboy \(Gregory A. Beamer\)

The reason it fails has to do with the calling stack for ASP.NET in IIS.
Session start can be a bane of our existence at times. Application_Start is
even more fun. :)

Things like this are why I use testing frameworks, like nUnit. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top