Program Debugging


 

Program debugging using the Sunbelt PL/B Web Server is simple and straightforward.

 

Begin by compiling the source file and generating a symbol file. The IDE generates a symbol file by default anytime a program is compiled. If you are executing from the command line, compile with the "-s" option using:

 

plbcmp {source file} -s

 

Ensure that both the generated .PLC and .SDB files are accessible through the web server via the PLB_PATH .INI file specification. By default, programs are placed in the "demo\programs" directory.

 

The next step is to start the PLB GUI Debugger Listening Task. Open a "Development Console" for your version of PL/B for Windows and initiate the task from there. Click the Windows "Start" button and then select "All Programs". Find "Sunbelt" and then your version of PL/B for Windows. Within that item will be a selection named "PLB Console Dev". Clicking that item will open a Windows console with the path and other environmental items set as required. Now start the PLB GUI debugger in listening mode by using the following command:

 

plbwin dbgiface -listen

 

A window will appear indicating the debugger is running and waiting for a program logon. This window may be minimized if your wish.

 

Now, move to your browser and enter the following URL:

 

127.0.0.1:8081/webtest.plc?runopt=-dr

 

If your PL/B Web Server is installed on a network server, replace the "127.0.0.1" with the server's IP address.

 

The "?runopt=-dr" parameter instructs the runtime to execute the program in debug. Once entered, a window will open and display the program source in the GUI debugger. Exiting the debugger will return you to the command line.

 



PL/B Web Server FTP Support Invoking a Program from HTML