Tools

Touch Portal provides tools to allow you to efficiently create plug-ins. This section will show you which and how to use them.

Logs (before API 7)

Check out the "log.txt" file in the Touch Portal data folder. Touch Portal logs every error of the plug-in communication.

Logging for plug-ins is turned off by default. Use the parameter:

-logPlugin

for the TouchPortal.exe file to turn on the plugin logging.

Logs (API 7+)

The log system has been given additional options in Touch Portal version 3.2.

Filtering

You will be able to filter the logs view with wildcards or with regex.

Log Tag Selecting

From version 3.2 of Touch Portal you will be able to check and uncheck all available logging tags that Touch Portal offers. If a tag is unchecked, it will no longer be logged. The API will have three different dedicated logging tags which are for the API system, the Plugin Importer and the Plug-in instance logging tag.

Plug-in Tools in Touch Portal (API 7+)

From version 3.2 of Touch Portal you have access to several Plug-in Tools designed to aid you in the process of developing plug-ins. These tools are only visible to the plug-in devs. To enable these tools you need to open (or when not present, create it) the file "config.properties" in the data folder of Touch Portal. Then add the following line (or change it if it already exists);

pluginDevTools=true

This will enable all sorts of options for you as a plug-in developer. We will list them below

Plug-in Settings -> Plugin devs button

Remove All Plug-in settings

This will remove all the plug-in settings stored in Touch Portal. They will not be present anymore.

Clear All Plug-in settings

This will clear all settings and set them to their default values.

Network Plugins (API 7+)

Touch Portal sets up a listening server for ip 127.0.0.1 which will limit the communication to and from plug-in on the local host only. Networking communication cannot be set up with this. To allow users (and plug-in developers) to listen to plug-ins on the network you need to open (or when not present, create it) the file "config.properties" in the data folder of Touch Portal. Then add the following line (or change it if it already exists);

pluginNetworkIp=self

This will open the listening server using the local ip address retrieved from the used adapter in Touch Portal.

pluginNetworkIp=0.0.0.0

This will open the connection using the given ip address. In this example it is 0.0.0.0 which means it will open the listening server on all available network adapters on the machine including the localhost.

A full reboot of Touch Portal is required after adding/changing this.

This option will be used for all plug-ins. This means that if you use a dedicated ip or the "self" option it will most likely break communication with plug-ins that only work on the localhost option.
Opening up the plug-in server to network communication makes it more accessible from other computers in the network or from the internet. Be cautious when using this. Only use this option if you know what you are doing. Be sure to prepare your firewalls to prevent un-invited communication.