Click to See Complete Forum and Search --> : Debugging dotnet DLL
xor83
Jul 26th, 2007, 04:41 AM
can i debug Csharp DLL in vb6?.... plz help
randem
Jul 26th, 2007, 04:41 AM
If you don't have the source... No.
RobDog888
Jul 26th, 2007, 04:45 AM
You need to have Visual Studio.NET of the same version or a compatible version that the dll was written in. Then if you have that you need the source code like randem posts. Then after that you would need to create a test project in .NET to allow you to debug during runtime.
xor83
Jul 26th, 2007, 04:49 AM
i have source code and tlb file
RobDog888
Jul 26th, 2007, 04:50 AM
Then what version of .NET was it writen in? Also, was it written in VB.NET or C#?
randem
Jul 26th, 2007, 04:52 AM
The source to the CSharp file? If you have the source to that file and the source to the vb file. You can compile each with the create Symbolic Debugging Info switch and you can load the source and the exe into the VS C++ workspace and debug it from there.
xor83
Jul 26th, 2007, 04:53 AM
thx Rob
Then after that you would need to create a test project in .NET to allow you to debug during runtime
why i need test project?
can i break directly into .NET DLL?
xor83
Jul 26th, 2007, 04:54 AM
yes, source code is in CSharp file
it's in VS.NET 2003
RobDog888
Jul 26th, 2007, 04:54 AM
Yes, since you are going to be running the dll source code it needs the same environment as it compiled use. So you would add a reference to your dll source code project from the test project. You will have to simulate the things you are doing in VB 6 but in VB.NET as you cant debug across them.
Thread Moved
xor83
Jul 26th, 2007, 04:59 AM
i have vb6 application which use CSharp DLL through TLB file so if i call CSharp DLL will it break?
CSharp DLL also running and i have set CSharp DLL(TLB) in my vb6 project
mendhak
Jul 27th, 2007, 11:14 AM
i have vb6 application which use CSharp DLL through TLB file so if i call CSharp DLL will it break?
CSharp DLL also running and i have set CSharp DLL(TLB) in my vb6 project
If I've understood the explanation of your setup correctly, no, it won't break in.
techgnome
Jul 27th, 2007, 11:44 AM
Actually... it is possible....
Start the application, not in the IDE though....
Fire up VS2005 -- ooh... I see you have 2003.... I think this will still work...
Load up the project in the VS2003 IDE.... then from the Debug menu, select Attach to Process... you should get a listing of all processes runnig. Find your app.... and select it...
in the code, set your breakpoints where you want them in the .NET code....
switch back to your app and do what ever you need to do that invokes the call to the .NET DLL.... it *should* break at your break points....
-tg
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.