WinC PLEX function (which is part of a really big project) that works fine in a development environment.
Unfortunately doesn't work in some deployment environments. (All works fine except this function)
Need to debug this function in the deployment environment to detect the problem.
would like to use Visual Studio to Debug.
Please find the steps outlined below to debug the specific function along with binaries built with release mode.
Following the below instructions will build the specific function's binaries in Release With PDB mode that is ready for debugging.
Open specific function Project in Visual Studio e.g. <FunctionImplentationName>.vcxproj from Gen/Project folder.
After the project opens, ensure the configuration selected is Release.
Select Project -> Right Click and Properties.
In the Project Properties Window, change the compilation properties.
4.1. Set Optimization from Minimize (/01) to – Disabled (/0d)
4.2. Set Debug Information Format from Empty to Program Database (/Zi)
4.3. Set Generate Debug Info from Empty to Yes (/DEBUG)
4.4. Set Precompiled Header from Use (/Yu) to Create (/Yc)
4.5. Close the Project Property window and make sure the changes have been saved.
Build the Project - Right Click on the project name and select Build/Rebuild.
Build should be successful.
Now, you should have a debuggable version of binaries (Release With PDB) for a specific function.
You can close this open project.
Now you can debug this specific function.
Deploy the specific function-built binaries (Dll, PDB).
Launch the application (top-level EXE).
Open Visual Studio IDE and click on the tool menu “Debug -> Attach to Process..” and select the top-level application you have just launched in step 10.
Click on Attach push button.
Open the generated source code file (File -> Open) <FunctionImplementationName>.CPP e.g. AA2F.cpp.
Keep a breakpoint accordingly in the opened source file, possibly to start with the constructor of the function.
Execute the process flow in your launched application that can load the function that you want to debug here.
Once the breakpoint is triggered, continue to debug the application as required.
This will help to debug the business logic within the specific function.