September 28, 2005

Steps for debugging .NET assembly from Web App

Steps for debugging .NET assembly from Web App.

1. From GAC delete Assemblies reference (if any) which you want to debug.
2. Open .NET project which you want to debug and perform following actions:
a. Go to Project properties and
i. select “Configuration properties”
1. Select “Debugging” and
a. In “Start Action” select “Start Program” and point to VB6.exe
b. In “Debuggers” select “Unmanaged code Debugging”
2. Select “Build” and
a. select output path to “C:\YOUR DLL PATH”
b. select “Generate debugging information”
b. Go to Solution Properties and
i. Under “Search these paths for search files”
1. Select “Debug Source Files” and type “C:\YOUR DLL source PATH”
2. Select “Debug Symbol Files” and type “C:\Your DLL Path (pdb file)”
3. Open Windows Explorer and delete \Bin and \Obj folder under the .NET project which want to debug.
4. Compile .NET project
5. Open VB DLL project.
a. Remove reference to .NET component which you want to debug and click “OK”
b. Again open “Reference” window and add reference to new .NET assembly by adding a .TLB file under “C:\Your DLL Path”
c. Go to project properties and select “Compile” tab and
i. Select “NO optimization”
ii. Select “Create symbolic debug info”
d. Compile VB project and create DLL in “C:\Your DLL Path”
6. Close VB project.
7. Start .NET project which will start VB
8. Open VB project which you want to debug and press “F5” to run the project
9. Put debugging points in VB and .NET project and start Web App to debug the projects.