How to debug VB.NET COM+ object in VS.NET
How to debug VB.NET COM+ object in VS
January 16, 2004
How to debug VB.NET COM+ object in VS.NET
Just recently discovered how to debug a VB.NET COM+ object in VS.NET and thought I would share it because it was extremely helpful in debugging errors. The key in doing this is getting process id of the dllhost.exe that you want to debug. Follow the steps below to retrieve the process id for your COM+ application.
Open Component Services
Drill down to COM+ Applications under My Computer
With the COM+ Applications displaying on right side of the screen, click the View menu and then make Status View the active view.
Write down the number in the PID column that corresponds with your COM+ application in question.
You know have the Process ID and you need to attach your solution to that process in debug mode. Follow the steps below to attach the solution to the Process ID.
Open the Visual Studio.NET solution
Make Solutions Configuration box Debug
Now click the Tools menu option and choose Debug Processes menu option
When the Processes box appears find the PID number from Component Services in the ID column.
Highlight the row and click the Attach button.
When the Attach to Process box appears then check the Common Language Runtime and Script checkboxes. Click the OK button when finished.
When the Processes screen is active again you will now see a DLLHOST.EXE in the Debugged Processes box. The ID number should be the same as the one in the Component Service console.
Close the Processes screen to return to the solution screen and the debug process should already be running.
Now set a break point in your code and run the application locally. Whenever your application reaches that break point it should stop.
Read more about:
MicrosoftAbout the Author
You May Also Like