• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

How do I run a vb.net dll in break mode

I have written a vb.net dll that launches from another application that I have written. I want to run the dll in debug mode with break points but when it is launched from the application it always runs the compiled dll and not the source code. I have set the dll to launch the desired application when started which it is doing. If I delete the compiled dll to try force it to use the source code in debug mode then it gives me "an unhandled exception of type 'system.io.filenotfoundexception' occured in mscorlib.dll".
0
PantoffelSlippers
Asked:
PantoffelSlippers
2 Solutions
 
DhaestCommented:
The easiest solution:
1. Open your project where you have a reference to the dll.
2. Add the dll project to your solution.
3. Remove the reference to the dll (in your calling project)
4. Add a reference to the dll-project (in your calling project)

Now set your breakpoints and run the program. Now it will go into the dll...
0
 
McExpCommented:
The key to making this work is opeing a copy of the Source File you want to debug in the current solution. you need to make sure the breakpoints are set on the file in the current solution.

You should then see the code breaks.
0
 
Fernando SotoCommented:
Hi PantoffelSlippers;

This is how I do it.

1. Open the DLL project in Visual Studio.
2. Set the breakpoints that you want.
3. Open the projects property page.
4. Select the Debug tab on the left side of the window
5. Select the radio button near the top that states, "Start external program", then click on the button at the right of the text box and browse to the program that uses the DLL and select it.
6. If the program needs any command line arguments place them in the, "Command Line Arguments text box a little bit down the page.
7. The go to the main menu Debug -> Start Debugging
8. Your application will start and when you hit the breakpoint in your code in the dll it will stop.

Fernando
0
 
McExpCommented:
Have you recieved a satisfactory solution?
0
 
PantoffelSlippersAuthor Commented:
Hi

Solution provided by FernandoSoto works for me.

Thanks
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now