lambci / docker-lambda

Docker images and test runners that replicate the live AWS Lambda environment
MIT License
5.83k stars 431 forks source link

Add debugging support. Minor refactoring #127

Closed ndobryanskyy closed 5 years ago

ndobryanskyy commented 6 years ago

Hi, @mhart please take a look at this!

This PR takes a required step towards the ability to debug .NET Core application issue;

It adds additional optional flag -d and a known environment variable _SHOULD_WAIT_FOR_DEBUGGER if any of these is set Lambda will halt the execution until the debugger is attached. Apart from that this PR formats code style for access modifiers.

We have an issue in this repo also. This PR, takes the most lightweight approach and does not touch the Dockerfiles at all.

mikemorain commented 5 years ago

Looks like a solid start for the integration to me. Thank you for changing to a loop to wait, to smooth out that IDE experience for the developers.

More a question than anything: do we feel that the timeout interval should be configurable?

ndobryanskyy commented 5 years ago

@mikemorain surely we can add this functionality, but I don't see any practical use case for that. What do you think?