Modified 16-NOV-2010Type HOWTOStatus PUBLISHED
In this Document
Goal
Solution
Overview
Caution
Rebuilding Business Functions
Debugging Business Function Called from Application or UBE Running Locally
Debugging Business Function called from application running on local web server of a Standalone Client (Demo Client)
Debugging Business Function called from Table Conversion Running Locally
Common Issues When Debugging a Business Function
References
Applies to:
JD Edwards EnterpriseOne Tools - Version: 8.93 and later[Release: 8.93 and later ]
Information in this document applies to any platform.
This document was previously published as Customer Connection Solution 200974879
Goal
Starting with application release EnterpriseOne 8.11, Visual C++ version 6 is no longer supported. How do I debug a business function (BSFN) using Visual C++ .NET 2003/2005/2008?
Solution
Overview
You can use Microsoft Visual C++ .Net to debug business functions in EnterpriseOne, including C business functions, Named Event Rule (NER) business functions (by debugging the NER generated C code), and Table triggers (by debugging the NER generated C code). You can debug business functions attached to interactive applications or batch applications, but the business functions MUST be executed locally. If launching a UBE, this generally means running it on the local workstation.
Caution
- To debug business function, business functions MUST be executed locally. If launching a UBE, this generally means running it on the local workstation.
- If you have debug JDE business function using Visual C++ 6 before, with Visual Studio .NET, you do not need to load the BSFN dll
- Also if a user has debugged C BSFN before with a previous version of Visual Studio then they may be prompted to convert the existing Activera.spl (project) file to Visual Studio 2008. We recommend to delete the file before trying to debug.
Rebuilding Business Functions
- Before debugging a business function, the business function must be rebuilt using busbuild because it cannot be debugged without a .pdb file, and pdb files are not delivered with a package install. For Xe and ERP8, .pdb file is not needed.
- Sign on to EnterpriseOne Development Client, go to Object Management Workbench, find the business function that you want to debug and bring it into a project. Check out the business function or do a Get.
- Select the Design button. In the design window select the Design Tools tab. Select the Build Business Function icon.
- In the BusBuild window, make sure that under the build tool bar the debug info has a check mark by it, and the dropdown box has the appropriate build mode, Optimized in this case. Make sure the client package is built in optimized mode not debug mode and the bsfn to debug is built in optimize mode and not in debug mode. Debug mode is no longer used.
- If debug info is not checked, let the build finish, check the debug info option, Close BusBuild, and hit build again.
- If the dropdown box has the wrong build mode, to avoid memory violations, let the build finish, select the correct mode in the BusBuild mode window, close BusBuild and hit build again.
- Close out of the Oracle J.D. Edwards EnterpriseOne software.
Debugging Business Function Called from Application or UBE Running Locally
- Make sure that no EnterpriseOne software (activeConsole, UTB, BusBuild, etc.) is running. The software must be closed to correctly debug using Visual C++ .NET.
- Open Microsoft Visual C++ .NET and make sure that all workspaces are closed.
- From the file menu, choose Open Project.
- Make sure to choose all file types or Executable Files (.exe) so you can choose the correct executable.
- Select ACTIVECONSOLE.EXE on path e811\System\bin32
- From the File menu choose open to open the .c or .h files for the business function (e811\path code\source\Bxxxxxx.c)
- Set your break points in the code (make sure to set your break points after the Main Processing section).
- Go to the Debug menu option and click Start.
- Save the solution file
- If "No Symbolic Information" message box for activConsole.exe appear click OK and continue.
- It is a normal feature of visual studio 2003/2005/2008 to disable break point at the start of a debug session and display a warning saying "The breakpoint will not currently be hit. No symbols have been loaded for this document.". Break point will only be activated on demand when the code to debug is loaded in to the runtime memory.
- The EnterpriseOne login box will appear.
- Sign into the Oracle J.D. Edwards EnterpriseOne software.
- Launch the application or submit the UBE (locally) as you normally would (Task, Interactive Versions, Batch Versions, OMW etc). When the application or UBE reaches the business function to Debug, it will display the C code in Visual C++ .NET so that you can step through it.
- If you are debugging event rules and "C" business functions, you can use the ER Debugger and Visual C++ debugger together. Follow the steps above until you log into the Oracle J.D. Edwards EnterpriseOne software. At this point follow the steps for the Event Rule Debugger. Program execution stops if "C" code is accessed. You can then use the Visual C++ to continue debugging. This is useful if you are trying to locate a problem and you are not sure whether the problem is in a "C" business function or the application calling the business function.
Debugging Business Function called from application running on local web server of a Standalone Client (Demo Client)
- For Demo version, the business function will run in jdenet_n.exe kernel thread.
- Click Tools -> EnterpriseOne Menu in Solution Explorer
- Go to Window Task Manager, click on Processes tab, right click jdenet_n.exe and select Debug
- Verify that it selected Visual C++ .NET for debugging and click ok
- "At Attach to Process" dialog box, make sure Native option is checked and click ok
- From the File menu choose open to open the .c or .h files for the business function (e811\path code\source\Bxxxxxx.c)
- Set your break points in the code (make sure to set your break points after main processing section).
- Launch the application from local web server EnterpriseOne Menu, when the application reaches the business function to Debug, it will display the C code in Visual C++ .NET so that you can step through it.
Debugging Business Function called from Table Conversion Running Locally
- Debug as if the business function is called from UBE.
- However for Tools Release 8.96 and forward, it may not stop at break point, please refer to document 651065.1 for how to debug.
Common Issues When Debugging a Business Function
- It is a normal feature of visual studio 2003/2005/2008 to disable break point at the start of a debug session and display a warning saying no symbol is loaded. Break point will only be activated on demand when the code to debug is loaded in to the runtime memory.
- If the business function won't stop at break point, check the following:
- Bsfn must run locally, make sure there is no OCM that mapped it to run on server.
- Make sure there is no UBEThread=0 in the [UBE] section of the jde.ini as this will make the UBE run in separate process instead of same thread as Visual C++ so UBE calling bsfn will not be caught by Visual C++.
- For Visual Studio 2005, make sure SP1 is installed and MTR is met.
- Make sure the client package is built in optimized mode not debug mode and the bsfn to debug is built in optimize mode and not in debug mode. Debug mode is no longer used.
- Prior to debug, please logout of jde, run busbuild.exe and do a build all then use omw to build the bsfn you want to debug.
- Please test debug B0100002 that is called from P01012 Find button. You can run P01012 locally on windows client. When you run P01012, the warning "no symbol is loaded" will go away because the dll is loaded in to the runtime memory.
- If unable to find jdenet_net.exe in Task Manager, close all and restart EnterpriseOne client. When you end debug in Visual C++ .NET after attaching to jdenet_n.exe, jdenet_n.exe will exit.
- If you get dll does not have debug info when you start debug, please logout of JDE, run busbuild.exe in 8.11\system\bin32 and do a build all.
References
NOTE:651065.1 - E1: BSFN: How to Debug a Business Function called by a Table Conversion
RelatedProducts
- JD Edwards EnterpriseOne > Tools and Technology > EnterpriseOne Tools > JD Edwards EnterpriseOne Tools
C; BUSBUILD; BUSINESS FUNCTION; DEBUGGING; STUDIO; VISUAL STUDIO