I’m not even sure if this is possible but I’ve been developing/debugging code with a simple text editor and a ton of message boxes. This is inefficient at best.
Wondering if there’s a tool like Microsoft Visual Studio that can plug into Epicor code, set breakpoints, evaluate and edit variables in real time, etc.
Any tips and links to how to set this up to work with Epicor would be GREATLY appreciated.
@Gregory_Leepart, that extension will pull your customization into visual studio so that you can code with auto complete. The debugging part already existed in Epicor, you click on the debug checkbox when you open the customization, and it will open in VS and allow you to run with break points and debug.
On BPMs I use VS to code and the app server event viewer to get error messages or progress of the BPM.
The event viewer will give you the routine and sometimes the line number of the error.
If you don’t get line numbers add log entries to follow the process like below.
Ice.Diagnostics.Log.WriteEntry(" email from is good" + EMAIL_From);
DMRHead = Db.DMRHead.Where(DMRHead_Row => DMRHead_Row.Company == ttDMRActnRow.Company && DMRHead_Row.DMRNum == ttDMRActnRow.DMRNum).FirstOrDefault();
Ice.Diagnostics.Log.WriteEntry(" dmrhead is good");
When you do get a line number it is referencing the whole routine and not just your BPM, so you need to load the source file from the app server to find the number and it is not always the exact number. could be a line before or after. The number at the end is a directory that is generated with each BPM save. \c-e10app1\d$\Epicor\inetpub\wwwroot\Pilot\Server\BPM
For this Data Directive.
\c-e10app1\d$\Epicor\inetpub\wwwroot\Pilot\Server\BPM\Sources\DT\ERP.DMRActn.Triggers\13
if you have an entry in the event viewer that you are not sure what BPM wrote the entry you can use @hkeric.wci’s tip below on using grep in CMDER to find all routines that have a section of code in them. I have found this invaluable in the past month.
So @Banderson is correct that it is harder than stepping thru in VS, but with the right tools it is doable.
Intelisense is a fantastic tool for the seasoned developers among us, too. (Why use a screwdriver when you can use a power drill!) @josecgomez has done an outstanding job creating such a useful add-on.
As for your customization, it crashes as soon as I click Open. Not sure if I’m pointing to the wrong Client folder but I’m pointing mine at C:\Epicor\ERP10\ERP10.1.600.0\ClientDeployment\Client
Download folder is to one on my desktop. DNSpy I have no idea what it is and it sounded optional in your video so I left it blank.
Yes that is the wrong client folder it should be the same place you are running you epicor application from.
Also you need to make sure you downloaded and installed the appropriate helper library for your version of Epicor. In your case it is this one https://josecgomez.com/files/CustomizationHelper.10.1.600.X.zip?0.43.0
And that needs to be unblocked and extracted into the Epicor client folder.
If your Debug In Visual Studio is grayed out is because you do not have Visual Studio installed.
Ok. Change Client folder to “C:\Epicor\ERP10\LocalClients\ERP1016Production” based on path found in properties of shortcut used to launch Epicor.
Extracted customization files into folder. It wanted to overwrite System.console.dll but I said no, renamed the original and then copied yours in. Anyways, your customization appears to be working as I got to the sysconfig screen.
I just signed into VS, thought maybe that was the issue but still greyed out Debug checkbox. User maintenance checkbox maybe?
Does your customization allow debugging or just autocomplete code writing and all your fancy pants tools?
It does both but for debugging you need DNSpy which is a separate tool to install. The epicor debug checkbox is version specific for your 10.1.600 you need to install visual studio 2015 for debuging with the Epicor version.