Can't step Into and debug the serviced component source code
Asked Answered
P

1

7

I have developed a COM+ Component in C# be inheriting ServicedComponent. Here is how it looks like:

    [Transaction(TransactionOption.Required)]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [EventTrackingEnabledAttribute(true)]
    [JustInTimeActivation]
    [ObjectPooling(Enabled = true, MinPoolSize = 10, MaxPoolSize = 30, CreationTimeout = 15000)]
    [Synchronization]

    class MyComponent: System.EnterpriseServices.ServicedComponent
    {
        [AutoComplete(true)]
        public string getHello()
        {//2nd breakpoint
            ContextUtil.SetComplete();
            return "HelloWorld";
        }
    }

I have another test project from which I call this component.

class Program
{
static void Main(string[] args)
{
MyComponent myComp = new MyComponent();
myComp.getHello();//1st Breakpoint
}
}

I am not able to reach 2nd Breakpoint. This was working before I switched to VS 2012. Strange thing is after switching to 2012 its no longer working in VS 2010 too.

I've already tried,

  • Attach to process
  • Unchecked "Enable Just My Code" in debug settings

Can someone please give direction from here?

UPDATE 1

From the links given by Mike, I tried symchk for my DLL in the same folder where DLL and PDB files were there. It fails with error saying PDB mismatched or not found. I don't know how to resolve this error.

Phrygian answered 10/7, 2015 at 17:39 Comment(0)
L
5

You may be missing the .pdb file in your project.

Check this microsoft link out for an explanation: https://msdn.microsoft.com/en-us/library/yd4f8bd1(vs.71).aspx

Ligetti answered 10/7, 2015 at 17:47 Comment(4)
When I build the project, I see the .pdb file in my debug folder. Is there a way I can check if that's linked properly while debugging?Phrygian
This is probably unlikely, but another thing that can cause this is having an outdated .dll in your GAC. I am not sure if you can check to see what the linker is using. My experience has been missing pdb. Here is a more robust article on the topic: msdn.microsoft.com/en-us/library/windows/desktop/… - Sorry, wish I could be of more helpLigetti
Thanks for the links, I'll go through them and see if that helps!Phrygian
symchk failed with mismatch or no files found error. :(Phrygian

© 2022 - 2024 — McMap. All rights reserved.