473,465 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to step into a Dll ?

I write some codes and compiled them into a DLL file,also I have a project
to reference the dll. They can work fine. Now I want to add some functions
to the DLL and debug it, but I can't step into the DLL source line.

Anyone can help me? Thanks in advance.

Peter
Nov 21 '05 #1
5 5252
"Peter" <zl*****@sina.com> schrieb:
I write some codes and compiled them into a DLL file,also I have a project
to reference the dll. They can work fine. Now I want to add some functions
to the DLL and debug it, but I can't step into the DLL source line.

Add an EXE project to the solution, reference the DLL project and start
debugging for the EXE project. In addition, take a look at "Project" ->
"Properties" -> "Configuration settings" -> "Debugging".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ex*************@TK2MSFTNGP15.phx.gbl...
"Peter" <zl*****@sina.com> schrieb:
I write some codes and compiled them into a DLL file,also I have a project
to reference the dll. They can work fine. Now I want to add some
functions
to the DLL and debug it, but I can't step into the DLL source line.

Add an EXE project to the solution, reference the DLL project and start
debugging for the EXE project. In addition, take a look at "Project" ->
"Properties" -> "Configuration settings" -> "Debugging".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Another way to step into a DLL assembly would be to open up it's project
settings and change the output type to Console Application. Then add a
Public Shared Sub Main() method to it. Create an instance of the class
inside the Main method and call the methods you wish to test. This may take
a bit longer to do, but doesn't require you to add another project. Also,
you will have to reset those changes prior to releasing it...because it will
be compiling to a .exe and not a .dll :)

HTH,
Mythran

Nov 21 '05 #3
"Peter" <zl*****@sina.com> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
I write some codes and compiled them into a DLL file,also I have a project
to reference the dll. They can work fine. Now I want to add some functions
to the DLL and debug it, but I can't step into the DLL source line.


For a "local" DLL (one that doesn't get added to the Global
Assembly Cache), change the "Start Action" [Project] settings to run
a program that /uses/ your DLL. Add breakpoints to the DLL code
and run ...

For a DLL that /does/ go in the G.A.C. (like most of mine), the
same principle applies, but you have to remember to re-"register"
the DLL in the G.A.C. after every build.

HTH,
Phill W.
Nov 21 '05 #4
Since you already have a project that you're running and have made
changes to your DLL, you'll just want to rebuild your DLL in Debug
mode. After that, make sure that your other project that references
this DLL, get's a reference to the Debug version. Tip: If you have
the Copy Local property set to true on this reference, simply change it
to False, then change it back to True. This will tell Visual Studio to
get a new copy of that DLL. It will now have the Debug version, and
you can step into any method of that DLL.

Nov 21 '05 #5
Now I can debug my Dll source line by seting the DLL project's "Start
Action" to use my Exe project. Thank you,I'm proud of you.

Peter

Nov 23 '05 #6

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

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
10
by: tram | last post by:
How do we pass on the step1 output file to step2 of the same job? I would like to know the current job's output file programmetically, instead of hard coding it. Any idaes would be appreciated. ...
4
by: Claudio Grondi | last post by:
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that...
4
by: light_wt | last post by:
Hi I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET Is there good free resource...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
1
by: Jim Hammond | last post by:
I can get data from a client-side assembly to the server in two manual steps, but I need to be able to do it in one step. Step 1: The user presses the manually coded "Step 1" button, which calls...
27
by: Julien Fiore | last post by:
Do you wand to install Pyrex on Windows ? Here is a step-by-step guide explaining: A) how to install Pyrex on Windows XP. B) how to compile a Pyrex module. Julien Fiore, U. of Geneva
5
by: ibiza | last post by:
Hi all, I'd need a function that would rounds values like : d = roundTo(64.2, 0.25) ' returns 64.25 d = roundTo(64.2, 10) ' returns 64 d = roundTo(64.2, 100) ' returns 100 well, that rounds...
7
by: gregory.lielens | last post by:
Hi, I am using a small python file as an input file (defining constants, parameters, input data, ...) for a python application. The input file is simply read by an exec statement in a specific...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.