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

Remote debugging with custom package.json script #97

Open
hwride opened this issue Jan 21, 2021 · 0 comments
Open

Remote debugging with custom package.json script #97

hwride opened this issue Jan 21, 2021 · 0 comments

Comments

@hwride
Copy link

hwride commented Jan 21, 2021

Hi,

I have got a non-standard way of Node remote debugging worked. I'd like to ask advice on getting to work the standard way if possible.

Current approach
I am running App Service with a non-standard JS file location booted from an NPM script. E.g.

{
  "scripts": {
    "dev": "node src/main/main.js"
  }
}

I have currently got remote debugging working like this:

{
  "scripts": {
    "dev": "node src/main/main.js",
    "dev_debug": "node --inspect=0.0.0.0:11111 src/main/main.js"
  }
}

Then use AZ CLI SSH + port forwarding to get the port to my local machine. This work ok.

Other attempts
I initially had the following:

{
  "scripts": {
    "dev": "node src/main/main.js",
    "dev_debug": "node --inspect=0.0.0.0:$APPSVC_TUNNEL_PORT src/main/main.js"
  }
}

But I found that $APPSVC_TUNNEL_PORT did not have a value on the App Service machine. Do I need to enable some other setting to make sure this env var is populated correctly?

Or is there some better way entirely to get remote debugging working with Node and a custom file/script?

Any advice would be much appreciated!

Thanks

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

No branches or pull requests

1 participant