Search code examples
.netvisual-studio-debuggingmessagebroker

WMB8/.NET Compute Node Debug


In WebSphere message Broker 8, the new .NET compute node is awesome to interface Windows based services and handle windows things. However, it is non trivial to debug the code. I was hoping any of you have some clues towards this:

Short info:

Message flows in WMB is developed in an eclipse based IDE and there is a debugger to step through the logic. It integrates seamless with Java compute nodes that execute java logic.

.NET compute node logic is actually a method in a class in a .DLL project in Visual C# (could be any Visual XX flavour theoretically). It seems Visual studio is able to start an external program to debug a DLL project. However, in this case, it will be hard to start WebSphere Message Broker as an external application. Is there a way to attach debugging to this specific DLL that is used only by this specific WMB message flow?


Solution

  • To step through the .NET compute node in WMB8 do the following.

    This is NOT possible in Visual C# Express 2010 (free) edition.

    1. Setup your Visual Studio Build Configuration to Debug
    2. Make sure your Assembly path in Broker Toolkit points to the /Debug/yourcomputenode.dll and not the /Release/yourcomputenode.dll
    3. In Visual Studio, point out break points as needed
    4. Select "Debug", then "Attach to Process"
    5. You might need to select "Show processes for all users" and "Show processes in all sessions" to find WMB.
    6. Select the DataFlowEngine process that corresponds to your Execution group (having just one EG will make this easy)
    7. Run your flow, and it will break inside your .NET compute node, and you can debug as easy as in a Java Compute Node.
    8. This is independent to any debugging in Broker toolkit, you can choose to debug there as well, or skip it all together.

    Debug Party time!