'script' and 'trigger' in same job

It seems as though Lint doesn’t like it when I have both a ‘trigger’ block and a ‘script’ block, like this:

myjob:
  stage: myStage
  trigger:
    project: another/project
  script:
    echo "dispatching...";

Is there any way I can print some information to the debug terminal (namely the values of variables) in a job that uses a ‘trigger’?