Displaying relevant files within the project explorer

The following files are relevant for a C debugging session:

Files

Description

.gdbinit file

initialization script for the GDB debugger

.launch files

containing instructions for logi.CAD 3 in order to be able to debug the application on the remote target system

files within the folders src-gen and target

containing the generated C-code (src-gen) and the object files respectively (target)
These files are required in order to be able to set →breakpoints later on.

As these files are not displayed in the project explorer by default, you must have these files displayed:

  1. If required, change to one of the perspectives for application creating .

  2. Click images/download/attachments/451280970/IconViewMenu-version-1-modificationdate-1598000630466-api-v2.png in toolbar of the project explorer and select Filters and Customization...

  3. In the dialog, tab Filter, uncheck the following items:

    1. .* resources

    2. src-gen folder

    3. target folder

  4. In the dialog, click OK.
    Result: Now the project explorer displays additional files.

  5. images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg The following change of the .gdbinit file is required for remote target systems only. Do not change the .gdbinit file, if you want to debug the application on the built-in PLC.
    Background information: This change instructs the GNU debugger to search for the relevant libraries on the remote target system.

    1. Double-click the .gdbinit file.

    2. Copy the following line into this file and save the changes.

      set sysroot target:/

      images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg If you start the debug session for the application (= opening the perspective Debug) and you get the message Warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code , you must replace this inserted line by the following line:

      set sysroot remote:/