Note: If you want to debug a COBOL application running under
.NET on Linux the application must have a portable
.pdb file. To produce a portable
.pdb file for an application you need to specify either
Portable or
Embedded for
Debugging information on the
Advanced COBOL Settings dialog box before building the application. See
COBOL Properties for more information on the different values you can specify for the
Debugging information option.
To debug a .NET application that is running on Linux you use Visual Studio's
Attach to Process option:
- Click
.
The
Attach to Process dialog box is displayed.
- In the
Connection type field, select
SSH.
- In the
Connection target field, type the name of the Linux machine to connect to, then press
Enter.
The
Connect to Remote System dialog box is displayed.
- Enter the connection details for the Linux machine to connect to, then click
Connect.
The
Available processes list displays the processes running on the Linux machine that you can attach to.
- Click
Select.
The
Select Code Type dialog box is displayed.
- Click
Debug these code types, check
Managed (.NET Core for Unix), then click
OK to specify the type of code that you want to debug.
- Select your .NET process from the
Available processes list, then click
Attach. If you deployed using framework-dependent deployment (FDD), your application's process name will start with
dotnet. If you deployed using self-contained deployment (SCD), the process name will be the name of your application.
Visual Studio connects to your .NET application and you can start debugging as normal.