Redirecting standard output streams to socket

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:

  1. In the CodeWarrior Projects view, right-click the project folder to display a shortcut menu.
  2. 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.

  3. 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.

  4. Click the Common tab.

    The common settings are available in the right pane of the Debug Configurations dialog.

    Figure 1. Debug Configurations dialog

    Debug Configurations Dialog

  5. Select the Port checkbox.

    The Act as Server or Hostname/IP address options become available.

  6. Type the port number in the Port textbox.
  7. Select Act as Server to redirect the output from this process to a local server socket bound to the specified port.
  8. 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
  9. 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.