Ironing out the bugs in a project can be the most challenging part of the design process. No matter how carefully a system is constructed, there are almost always a few errors or warnings issued when the project is compiled and run. This chapter describes the reasons for some of the most common errors and warnings, along with how to deal with them.
Debugging a project can become even more difficult when user-written code is present. PSCAD does not include an integrated tool for debugging user system dynamics code (i.e. source code appended to the system dynamics through user-defined components), and so an external debugging tool must be used: Some possible methods for linking to an integrated debugger are described in this chapter.
In finalizing a project, the user may want to protect (i.e. pre-compile or encrypt) source code when supplying projects and components to other users. Topics are included here that describe both how to pre-build source code into a library (*.lib) or object (*.obj) files, as well as the ciphering tool for encrypting user-defined module code. Both of these methods will enable you to distribute projects to clients, without running the risk of exposing trade secrets.