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

Add support for npm run-script-based launches for skaffold debug #2141

Merged
merged 3 commits into from
May 23, 2019

Conversation

briandealwis
Copy link
Member

Fixes #2044

Adds support for launches by passing the node --inspect=xxxx option via npm's --node-options command line argument. This must appear after the run-script but before a -- (should it be present). npm uses this --node-options argument to configure the NODE_OPTIONS environment which is picked up by NodeJS 8 and higher.

Note: npm run-scripts that use nodemon (a node-based script) instead of node will not work as nodemon's node will interpret the NODE_OPTIONS and configure itself for debugging.

  • add limitations to docs
  • add debug integration tests for jib, nodejs, and npm artifacts

@codecov-io
Copy link

Codecov Report

Merging #2141 into master will increase coverage by 0.06%.
The diff coverage is 80.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2141      +/-   ##
==========================================
+ Coverage   56.31%   56.37%   +0.06%     
==========================================
  Files         180      180              
  Lines        7815     7858      +43     
==========================================
+ Hits         4401     4430      +29     
- Misses       2994     3007      +13     
- Partials      420      421       +1
Impacted Files Coverage Δ
pkg/skaffold/debug/transform_jvm.go 94.79% <100%> (-0.06%) ⬇️
pkg/skaffold/util/util.go 67.62% <100%> (+1.93%) ⬆️
pkg/skaffold/debug/transform_nodejs.go 78.84% <74.07%> (-3.92%) ⬇️
pkg/skaffold/debug/transform.go 82.4% <0%> (-3.8%) ⬇️
cmd/skaffold/app/cmd/cmd.go 73.33% <0%> (-0.93%) ⬇️
cmd/skaffold/app/cmd/config/list.go 23.52% <0%> (ø) ⬆️
cmd/skaffold/man/man.go 77.27% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 010c517...d096a07. Read the comment docs.

@chanseokoh
Copy link
Member

The Maven test project looks good.

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@balopat balopat merged commit 4918652 into GoogleContainerTools:master May 23, 2019
@briandealwis briandealwis deleted the npm branch November 11, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can skaffold debug support npm run-scripts
5 participants