Debug the edited code
The debugging process of the edited code is different for the design time and runtime NetLogic.
- If you want to debug a runtime NetLogic or if new custom types are created in the project, inFactoryTalk Optix Studio, select .TheFTOptixApplicationis compiles and runs.
- Select your development platform for debugging.
- If you use Visual Studio, from theDebugmenu, selectReattach to Process.IMPORTANT: If you have closed Visual Studio since the previous debugging session, selectAttach to Processand reset the link. See Configure the debugger.
- If you use Visual Studio Code:
- Open theRun and Debugpane by pressing .
- At the top of the pane, from the drop-down menu, select:
- Attach to FTOptixRuntime (NetSolution)
- Debugs a runtime NetLogic.
- Attach to FTOptixStudio (NetSolution)
- Debugs a design-time NetLogic.
IMPORTANT: If Visual Studio Code ignores the breakpoints, restart Visual Studio Code and repeat this procedure. - In Visual Studio or Visual Studio Code, in the debug mode, open the NetLogic that you want to check.
- Do any of the following:
- If the NetLogic is at runtime, selectStart Debuggingor press.F5
- If the NetLogic is at design-time, inFactoryTalk Optix Studio, right-click a NetLogic and select a method to execute.
- Debug the code.For more information on debugging in Visual Studio, see First look at the debugger - Visual Studio (Windows) | Microsoft Docs.For more information on debugging in Visual Studio Code, see Debugging in Visual Studio Code.
Provide Feedback