When a network is designed the codes that execute are related to the graphical user interface only. The final network created that is created is written as a xml file (Configuration.xml) once the Simulation is run.This file contains all the Device Configuration, Connection Information, Application Configuration and additional settings done in the GUI. This file can be obtained after saving the scenario or from the NetSim folder in the system temp path (%temp%\NetSim). Our general recommendation is that you do not edit this file. 

The protocol source codes can be debugged using Visual Studio to analyze the code flow alongside NetSim execution. Please read through the sections in the NetSim User manual on Writing, Implementing your own code, Debugging your own code( via GUI & CLI), adding breakpoints, viewing variables etc. You must also enable the packet and event trace to gain an appreciation of the internal working of NetSim. You may refer to videos available at https://www.youtube.com/Tetcos