The lambda execution is not suspending and the lambda container has no port exposed when running a java 11 lambda with the latest localstack docker image by docker-compose with the environment variable LAMBDA_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=_debug_port_
    
It works fine for java8 runtime executions.

Docker command:

> localstack_1  | 2020-01-26T12:42:04:INFO:localstack.services.awslambda.lambda_executors: Running lambda cmd: CONTAINER_ID="$(docker create -i   -e ENV="$ENV" -e DOCKER_LAMBDA_USE_STDIN="$DOCKER_LAMBDA_USE_STDIN" -e HOSTNAME="$HOSTNAME" -e LOCALSTACK_HOSTNAME="$LOCALSTACK_HOSTNAME" -e AWS_LAMBDA_FUNCTION_TIMEOUT="$AWS_LAMBDA_FUNCTION_TIMEOUT" -e AWS_LAMBDA_FUNCTION_NAME="$AWS_LAMBDA_FUNCTION_NAME" -e AWS_LAMBDA_FUNCTION_VERSION="$AWS_LAMBDA_FUNCTION_VERSION" -e AWS_LAMBDA_FUNCTION_INVOKED_ARN="$AWS_LAMBDA_FUNCTION_INVOKED_ARN"  --rm "lambci/lambda:java11" "com.XXX.XXX.Handler")";docker cp "/tmp/localstack/zipfile.0c90736c/." "$CONTAINER_ID:/var/task"; docker start -ai "$CONTAINER_ID";

I think this is due to the fact that the classpath arguments and java opts are only being set if the rutime is equal to LAMBDA_RUNTIME_JAVA8 (line 211 of ocalstack/localstack/services/awslambda/lambda_executors.py , commit 03c6f4bf250edd18eb818ed65090f508636b0bff)
def __init__(self, msg, code=400):
        super(ClientError, self).__init__(msg)
        self.code = code
        self.msg = msg
    def get_response(self):
        if isinstance(self.msg, Response):
            return self.msg
        return error_response(self.msg, self.code)
class LambdaContext(object):
    def __init__(self, func_details, qualifier=None):
        self.function_name = func_details.name()
        self.function_version = func_details.get_qualifier_version(qualifier)
        self.invoked_function_arn = func_details.arn()
        if qualifier:
            self.invoked_function_arn += ':' + qualifier
    def get_remaining_time_in_millis(self):
        
        return 1000 * 60
def cleanup():
    global event_source_mappings, arn_to_lambda
    arn_to_lambda = {}
    event_source_mappings = []
    LAMBDA_EXECUTOR.cleanup()
def func_arn(function_name):
    return aws_stack.lambda_function_arn(function_name)
def add_function_mapping(lambda_name, lambda_handler, lambda_cwd=None):
    arn = func_arn(lambda_name)
    arn_to_lambda[arn].versions.get('$LATEST')['Function'] = lambda_handler
    arn_to_lambda[arn].cwd = lambda_cwd
def add_event_source(function_name, source_arn, enabled):