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.
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.
Tip: If you debug with Visual Studio Code and the newest C# plugin does not work as expected, downgrade the C# plugin to 2.4.4. -
If you want to debug with Visual Studio Code, install the C# extension: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp.
-
From the main toolbar, select
Open .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, debug FTOptixRuntime and in FactoryTalk Optix Studio, select
Run.
Tip: You can run the project on the Emulator target for debugging. -
Design-time NetLogic. In the external code editor, debug FTOptixStudio and in FactoryTalk 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.