aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Inconsistent text output with local debugging

Open awschristou opened this issue 6 years ago • 2 comments

Description

Node 8 and Node 10 do not appear to have consistent text output (flushing?) on Ubuntu.

Steps to reproduce

On Ubuntu

  1. sam init -r nodejs10.x
  2. cd into folder
  3. sam build
  4. sam local invoke --no-event -d 5858

Observed result

When run from an Ubuntu installation, the following text is output:

<datetime> Mounting /home/......./HelloWorldFunction as /var/task:ro,delegated inside runtime container
Debugger listening on ws://0.0.0.0:5858/.......
For help, see: https://nodejs.org/en/docs/inspector

When run from a Windows 10 hyperv instance of Ubuntu, the same text above is output the first time. All subsequent times, the following text is output:

<datetime> Mounting /home/......./HelloWorldFunction as /var/task:ro,delegated inside runtime container

The "Debugger listening" message is missing from the output. Running docker logs <container> shows the missing text

Expected result

Describe what you expected.

The "Debugger listening" text is always output.

<datetime> Mounting /home/......./HelloWorldFunction as /var/task:ro,delegated inside runtime container
Debugger listening on ws://0.0.0.0:5858/.......
For help, see: https://nodejs.org/en/docs/inspector

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS:
  • Ubuntu 18.03
  • Windows 10 with hyperV running Ubunto 18.03
  1. sam --version: 0.16.1

awschristou avatar Jun 05 '19 17:06 awschristou

Are you also having debugging issues, or is this just a difference in output text?

awood45 avatar Aug 06 '19 16:08 awood45

If I attach a debugger manually, the debugger works fine, and the difference is in output text only.

The toolkit watches for "Debugger listening on" before attaching the debugger, so without that text, the debugger does not get attached.

awschristou avatar Aug 06 '19 16:08 awschristou

This is on a pretty old version of SAM CLI. Is this still happening on the latest?

jfuss avatar Aug 30 '22 20:08 jfuss

Closing. Please reopen or create a new issue if there is any new information about this issue.

lucashuy avatar Sep 08 '22 21:09 lucashuy