Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't debug class

Status
Not open for further replies.

dk2006

MIS
Jan 19, 2006
53
US
I am developing in VS 2005. In my solution, I have couple of projects. One contains all classes. The other contain all wondows forms. When I tried to step thru in debug mode, it never allowed me to step into one of my class. This is wierd. Can anyone explain why?
 
How did you set your reference to the other project? If you just hit the "Browse" button to do it, the reference is pointing to the binary, and the debugger may/maynot be able to show you the code.

Do a Project reference, instead.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Chip,
I not sure what you meant. But I instantiate the class within my Onload routine of my form. The I just simply call the class function to do certian job. All I want to know is why I can not step through my code in that class when I run it in debug mode. Is this bug in Visual Studio 2005?

Anyone?

Thank you,

sam
 
The key phrase in your question is:
In my solution, I have couple of projects.

In order for one project to use the other project's objects, a reference must be set. Typically, you right-click on the References node in the solution explorer pane, and select "Add Reference". You'll then be presented with a couple of different ways and types of references to add.

For inter-project references, go to the Projects tab, and select the other project in your solution that you need to add a reference for.

Afterwards, use an Imports statement to more-easily access the namespace of the other project.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
BTW you can only reference another project if it is a class library.

Christiaan Baes
Belgium

"Time for a new sig." - Me
 
Chip,
In "Add reference" tab "Projects", it does have that class listed. It will return the value from the class but would not letting me stepping into for troubleshooting.

sam
 
And did you double-click on that project to add it to the list of selected references down below?

Afterwards, it should be listed in the solution explorer under the "references" branch.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top