473,224 Members | 1,470 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,224 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 1918
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 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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.