Book a Demo
Prev Next

Debugging Configuration Linux

Debugger Configuration

This section describes the Debug section of an Analyzer Script in respect to debugging Mono under Linux.  Fields that are not listed here are not required.

Debugger

Select 'Mono'.

Default Directory

This is the fully qualified native Linux path where the application is located in Unix format.

Connection

  • port: the debugging Port
  • host: the name or IP address of the machine where Mono runs ('localhost' if the machine is the same)
  • localpath: the root path of the source code in Windows format; this is the path to the source files that you use to set breakpoints in the code editor in Enterprise Architect
  • remotepath: the root path of the source code in Unix format, this being the path to the source files used to build the program under Linux

    These paths are returned during debug events, and are then mapped to the local path, so that Enterprise Architect can display the source file during a breakpoint or step - both parameters can specify the same physical source file root, but must use the Windows or Unix format for each field
  • shutdown: (true or false); when true the VM is terminated when the Debugger is stopped
  • timeout: the timeout in milliseconds for socket calls
  • output: the Wine / Windows path of the log file to write to
  • logging: (true or false); when true, extra messages are logged in the Debug window and socket messages are logged to the specified output file

Starting Mono Automatically

You can configure Enterprise Architect to start Mono for you when you start the debugger. You do this by configuring the 'Runtime Host' page of your Analyzer Script. The format of the commands is described here:

     cd path-to-program

     /usr/bin/mono --debug --debugger-agent=transport=dt_socket,address=host:port,server=y,suspend=y program

where:

- path-to-program is the directory path where the program is located

- host is one of these:

  • localhost
  • an IP address
  • a networked machine name

- port is the Port for the socket

- program is the name of the application (such as MonoProgram.exe)

Starting Mono Manually using the Command Line

You can start Mono manually from a console. Locate the program in your file explorer, then open a console at that location. The format of the command line is described here:

     /usr/bin/mono --debug --debugger-agent=transport=dt_socket,address=host:port,server=y,suspend=y program

where host is one of these:

  • localhost
  • an IP address
  • a networked machine name

port is the Port for the socket and program is the name of the application (for example, MonoProgram.exe).