hapijs / hapijs/lab

Allow to specify debugger interface

Open
#1,049 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
736
Forks
177
PR merge metrics
No merged PRs in 30d

Description

#### Support plan

* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): no

#### Context

* *node version*: 14
* *module version*: lab 24.7.0
* *environment* (e.g. node, browser, native): node
* *used with* (e.g. hapi application, another framework, standalone, ...): standalone
* *any other relevant information*: inside docker-compose

#### What problem are you trying to solve?

I wanted to run the lab runner inside a docker and to attach to it a debugger.
The problem is by default, node listen to 127.0.0.1 and we require to be 0.0.0.0 to go through network of docker-compose.
Hapi/lab is just a little too restrictive to pass the argument to node.

#### Do you have a new or modified API suggestion to solve the problem?

Solution is to allow to pass [HOST]:[PORT] to node ( e.g. --inspect=0.0.0.0:9229 )
in file `bin/lab`, replace line 5 by:
```
const inspectPattern = /^(--inspect|--inspect-brk)(=.+)?$/;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.