Debug NetLogic locally
Identify, investigate, and fix issues with NetLogic code by locally using Visual Studio or Visual Studio Code.
To debug NetLogic remotely, see Debug NetLogic remotely.
TIP:
NetLogic errors are reported at runtime in the
FactoryTalk Optix Studio
log panel. NetLogic runtime errors are reported in the tab of the target on which the application runs (for example, Emulator Output
). The design-time NetLogic errors are reported in the Output
tab.For more information, refer to the external code editor documentation.
Prerequisites
- Download, install, and set Visual Studio or Visual Studio Code as the default code editor. See Set the default code editor.
- If you want to debug with Visual Studio Code, install the C# extension: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp.
- To debug NetLogic
- From the main toolbar, selectOpen .NET Solution.The default external code editor opens.TIP: Rockwell Automation recommends using Microsoft Visual Studio 2022 or Microsoft Visual Studio Code as the default code editor. Some development assistance features may not be available when using a different code editor.
- Debug either:
- Runtime NetLogic. In the external code editor, debugFTOptixRuntimeand inFactoryTalk Optix Studio, selectRunTIP: You can run the project on the Emulator target for debugging.
- Design-time NetLogic. In the external code editor, debugFTOptixStudioand inFactoryTalk Optix Studio, right-click a NetLogic and select a method to execute.
- Stop the debugger and application runtime and then edit the code.
- Repeat 2.
Provide Feedback