Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify debugger interface #1049

Open
danbraik opened this issue May 3, 2022 · 1 comment
Open

Allow to specify debugger interface #1049

danbraik opened this issue May 3, 2022 · 1 comment
Labels
feature New functionality or improvement

Comments

@danbraik
Copy link

danbraik commented May 3, 2022

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)(=.+)?$/;
@danbraik danbraik added the feature New functionality or improvement label May 3, 2022
@Nargonath
Copy link
Member

It seems to me like a good feature. I don't foresee any particular complication with it but let's see what others think. Perhaps I've missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

2 participants