where to see the response body and header

where to see the response body and header of the executed scala/gatling script?

You can see the response along with headers in the console itself by setting log level to Trace.

Or you can write it to a file as well.

The requests and responses printed in the simulation.log file under target\gatling
In order to do that, you need to enable tracing in the logback.xml. ( I’ve used and tested this in Gatling v3.0.2)

Here is the content of logback.xml. This file can be found under src/test/resources

<?xml version="1.0" encoding="UTF-8"?>

   <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
         <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>

   <!-- uncomment and set to DEBUG to log all failing HTTP requests -->
   <!-- uncomment and set to TRACE to log all HTTP requests -->
   <logger name="io.gatling.http.engine.response" level="TRACE" />

   <appender name="ERROR" class="ch.qos.logback.core.FileAppender">
         <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>
      <param name="Append" value="false" />

   <!--<logger name="io.gatling.http.ahc" level="DEBUG" additivity="false">-->
   <!--<appender-ref ref="ERROR"/>-->
   <!--  Set level to TRACE to log everything and DEBUG to log in case of errors-->
   <logger name="io.gatling.http.engine.response" level="TRACE" additivity="false">
      <appender-ref ref="ERROR"/>

   <root level="WARN">
      <appender-ref ref="CONSOLE" />