473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Debug inside a library

Hi all,
I have created a app. project and a library which will be used by the
main project, however i do not know how to get into debug mode inside the
library, although break point is set. is there anywhere to enable the debug
mode into library class.

thanks
rena.
Nov 21 '05 #1
3 1923
As long as :
1) the dll is compiled in debug mode
2) the pdb file for the dll is available
3) you have the source code file
you can debug the dll

All you have to do is create an EXE project to host it. Then in either VS or
the .NET debugger, you can pull up the source file and attach the debugger
to the EXE project. From there on out, it's just like normal debugging.

-Rob Teixeira

"Rena" <Re**@mail.hongkong.com> wrote in message
news:uX*************@tk2msftngp13.phx.gbl...
Hi all,
I have created a app. project and a library which will be used by the
main project, however i do not know how to get into debug mode inside the
library, although break point is set. is there anywhere to enable the debug mode into library class.

thanks
rena.

Nov 21 '05 #2
Hi Rob,
Two new project is created, I have already compiled the class library
project in debug mode, and i have another project added a reference to that
library project. (pdb is exist and reside in the class library project's
bin),
but i dont' know why i still can't go into the break point set on the
library project.
any hint?

Thanks.
Rena.

"Rob Teixeira" <RobTeixeira@@msn.com> ¦b¶l¥ó
news:eN**************@TK2MSFTNGP14.phx.gbl ¤¤¼¶¼g...
As long as :
1) the dll is compiled in debug mode
2) the pdb file for the dll is available
3) you have the source code file
you can debug the dll

All you have to do is create an EXE project to host it. Then in either VS or the .NET debugger, you can pull up the source file and attach the debugger
to the EXE project. From there on out, it's just like normal debugging.

-Rob Teixeira

"Rena" <Re**@mail.hongkong.com> wrote in message
news:uX*************@tk2msftngp13.phx.gbl...
Hi all,
I have created a app. project and a library which will be used by the main project, however i do not know how to get into debug mode inside the library, although break point is set. is there anywhere to enable the

debug
mode into library class.

thanks
rena.


Nov 21 '05 #3
Are you using 2 instances of Visual Studio?
You can only debug a process (exe) from one debugger as far as I know.
So, basically, there are a few things you can do.

1) Run both projects in the same VS instance. Open one VS instance, open the
EXE project, right-click on the solution in solution explorer, and click Add
Existing Project, and select the DLL project. Now you have the EXE and DLL
project loaded in one solution. Make sure you add the reference in the EXE
project (add project reference). This is the easiest way.

2) Debug the EXE project alone. Open one VS instance and load the EXE
project. Make sure it has a reference to the DLL. Click File->Open->File,
and open the vb file for DLL you want to set the breakpoint in. Now the file
is open in VS, but it doesn't show in solution explorer. If the DLL was
compiled in debug mode and has a valid PDB, you can set breakpoints in the
file and run the project to debug.

3) Debug the DLL project alone. Write a container EXE that references and
uses the DLL. Open one VS instance and load the DLL project. Go to Windows
file explorer and double-click the EXE to run it. Go back VS and click
Debug->Processes, and Attach to the running EXE. Now you can apply
breakpoints in the code and when the EXE gets to those parts of the code, it
will break for you.

-Rob Teixeira

"Rena" <Re**@mail.hongkong.com> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
Hi Rob,
Two new project is created, I have already compiled the class library
project in debug mode, and i have another project added a reference to that library project. (pdb is exist and reside in the class library project's
bin),
but i dont' know why i still can't go into the break point set on the
library project.
any hint?

Thanks.
Rena.

"Rob Teixeira" <RobTeixeira@@msn.com> ¦b¶l¥ó
news:eN**************@TK2MSFTNGP14.phx.gbl ¤¤¼¶¼g...
As long as :
1) the dll is compiled in debug mode
2) the pdb file for the dll is available
3) you have the source code file
you can debug the dll

All you have to do is create an EXE project to host it. Then in either VS
or
the .NET debugger, you can pull up the source file and attach the debugger to the EXE project. From there on out, it's just like normal debugging.

-Rob Teixeira

"Rena" <Re**@mail.hongkong.com> wrote in message
news:uX*************@tk2msftngp13.phx.gbl...
Hi all,
I have created a app. project and a library which will be used by

the main project, however i do not know how to get into debug mode inside the library, although break point is set. is there anywhere to enable the

debug
mode into library class.

thanks
rena.



Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Simon Burton | last post by:
Hi, I'm after a no-op command, so that i can redirect logging commands in performance critical code. Something like this: def log(*args): print args def null_log(*args): pass if not...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
10
by: John Smith | last post by:
After reading C# documentation the Conditional attribute seemed the way to go, but after inspecting the IL it seems those methods are still there and I imagine the CLR removes them. Using #if DEBUG...
5
by: Billy | last post by:
Hi! How can I override "Debug.Writeline("Message")" so that will not show that msg in Debug window, but wrote it to a file. I already have a code to write to a file but I would like to use just...
2
by: steve bull | last post by:
how can I debug a code library using C# 2005 Express? I cannot find any way to make the library debuggable - even when I set DEBUG and No Optimize on the debug panel of the code library's property...
1
by: joemynz | last post by:
Help please with a URLError. Invoking a url that works in Firefox and IE results in a "urlerror 7, no address ..." in python. I need to debug why. Traceback is below. There's a redirect when the...
7
by: Sunil Varma | last post by:
Hello all, I wrote a Windows Service in VC.NET 2005 I want to debug the solution. I tried as mentioned in the following link. ...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
5
by: Jeff | last post by:
..NET 2.0 I'm working on 3 projects in VS2005: - a windows application project - dll library project - windows service This works like this: The window form call some methods in the dll...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.