aws-sam-cli
aws-sam-cli copied to clipboard
Inconsistent text output with local debugging
Description
Node 8 and Node 10 do not appear to have consistent text output (flushing?) on Ubuntu.
Steps to reproduce
On Ubuntu
sam init -r nodejs10.xcdinto foldersam buildsam 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)
- OS:
- Ubuntu 18.03
- Windows 10 with hyperV running Ubunto 18.03
sam --version: 0.16.1
Are you also having debugging issues, or is this just a difference in output text?
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.
This is on a pretty old version of SAM CLI. Is this still happening on the latest?
Closing. Please reopen or create a new issue if there is any new information about this issue.