Posted: 18 Aug 2017 14:49 EDT Last activity: 4 Sep 2017 4:48 EDT
Which process should be attached when debugging a DLL in VS 2010
I developed a C# library project in Visual Studio 2010 in order to let OpenSpan project reference it. But for some test samples,this DLL didn't work.
So I tried to debug this DLL in VS 2010 by attaching a process "OpenSpan Runtime" after running this OpenSpan release,but the breakpoint can't highlight.(the DLL and PDB files are copied into OpenSpan runtime folder)
Can anybody tell me how to resolve this issue?I saw there was only one process(OpenSpan Runtime) with key words "OpenSpan".
The issue i met is like that: I developed a library project A,it includes a common class "User" which doesn't inherit any base class,it only has some properties like name,password and so on.Project A will reference another project B which provide log service.
When I call GetUser() method in OpenSpan project to extract proxy of "User" which is sealed in the project A.The break point in project A can't be highlighted
but project B can.
It makes me confused,I guess if openspan will change the name of DLL created by project A when running.
As I understand Project A and Project B are .net projects and Project B is referenced in Project A. In OpenSpan project you are using Project A dll and calling GetUser() method (i.e from Project A). But, we can't call methods in OpenSpan if those methods are not static or not inherit Component class. Can you post automation image and Project A, B class structure for more understanding.
But as per my analysis, you have to write wrapper class (with static or inheriting component) if you want to consume .net code in OpenSpan.
Note: OpenSpan will never change anything in the existing applications.
yes,GetUser() is a static method in Project A. While in Openspan project,there is also a script method 'GetUser" to call this method.I use the script method to extract proxy of User,if I need debug GetUser() in Visual Studio, the break point can't be highlighted.
BTW,I want to ask another question about a class UserUtil inherited class component,this class will list in toolbox. I drag it into A.os and initialize it,if I want to edit B.os which referenced UserUtil without openning A.os,openspan always show error message that can't find UserUtil, is it a bug of openspan?
jayachandrak is correct. The proper way to access these methods and debug them is by inheriting and implementing the Component class. It sounds like you are trying to indirectly call your library through a script component in OpenSpan. If the extracted proxy for User does not wrap the component class, I would say it is expected behavior that it is not allowing you to debug it.