467,915 Members | 1,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

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
  • viewed: 1708
Share:
3 Replies
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> 在郵件
news:eN**************@TK2MSFTNGP14.phx.gbl 中撰寫...
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> 在郵件
news:eN**************@TK2MSFTNGP14.phx.gbl 中撰寫...
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Simon Burton | last post: by
4 posts views Thread by emma middlebrook | last post: by
10 posts views Thread by John Smith | last post: by
5 posts views Thread by Billy | last post: by
2 posts views Thread by steve bull | last post: by
7 posts views Thread by Sunil Varma | last post: by
6 posts views Thread by Andrew Rowley | last post: by
5 posts views Thread by Jeff | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.