Hi Team,
I am creating DEE for CM 11. How to debug the DEE from my host visual studio to host container. Backend DLLs are debugging but DEE I am unable to do.
Thanks,
Simon C
Hi Team,
I am creating DEE for CM 11. How to debug the DEE from my host visual studio to host container. Backend DLLs are debugging but DEE I am unable to do.
Thanks,
Simon C
Hi Simon,
Thanks for your question. We’re currently reviewing our tools and plugins for debugging containers, but in the meantime, here’s a reliable process you can follow to debug your DEE from Visual Studio to your host container.
This method allows you to debug your DEE code within the Actions DLL.
Step-by-Step Debugging Process:
Adjust Your Custom Projct Actions Output: In your “Debug” configuration for the Actions project, change the output folder to your LocalEnvironment folder. This will ensure that when you build your project, the DEE DLL is generated in the correct location. The DLL will be named something like Cmf.Custom.MyProj.Actions.dll.
2.
Launch Your Local MES Instance: Start your local MES instance as you normally would.
3.
Edit Your DEE in the UI: In the MES UI, edit your DEE’s Test and Action code methods. You’ll need to add a reference to your Actions DLL.
4.
Replace DEE Code with DLL Calls: Update the code in both your test condition and action methods to call your DEE class directly from the DLL.
For the Test Condition:`
(new CustomDeeToDebug()).DeeTestCondition(Input);
For the Action Code Execution:`
UseReference("Cmf.Custom.MyProj.Actions.dll", "Cmf.Custom.MyProj.Actions");(new CustomDeeToDebug()).DeeActionCode(Input);
`
Save and Make Effective: Validate these changes, save your DEE, and make it effective in the system.
6.
Attach Visual Studio to the Container: Now, attach your Visual Studio debugger to the container where your MES instance is running.
You should now be able to set breakpoints in your DeeTestCondition and DeeActionCode methods within the Actions DLL and debug your code as it runs in the container.
Once you’ve finished debugging, remember to revert your DEE code in the UI to its final, updated version.
Hope this helps!
João Moreira
Super, it’s pretty useful tip, thank u.