This CodeWarrior feature allows you to redirect standard output (
stdout ,
stderr) of a process being debugged to a user specified socket.
To specify the initial connection redirection settings:
- In the CodeWarrior Projects view, right-click the project folder to display a shortcut menu.
- Choose Debug As > Debug Configurations from the shortcut menu.
The
Debug Configurations dialog appears. The left pane of the
Debug Configurations dialog has a list of debug configurations that apply to the current application.
- Expand the CodeWarrior tree, and select the name of the debug configuration for which you want to modify debugger settings.
The right pane of the
Debug Configurations dialog shows the settings for the configuration that you selected.
- Click the Common tab.
The common settings are available in the right pane of the
Debug Configurations dialog.
Figure 1. Debug Configurations dialog
- Select the Port checkbox.
The
Act as Server or
Hostname/IP address options become available.
- Type the port number in the Port textbox.
- Select Act as Server to redirect the output from this process to a local server socket bound to the specified port.
- Select Hostname/IP address to redirect the output from this process to a server socket located on the specified host and bound to the specified port. The debugger will connect and write to this server socket via a client socket created on an ephemeral port
- Click Apply.
The changes are applied to the selected debug configuration.
Note: You can also use the redirect command in the debugger shell to redirect standard output streams to a socket.