Skip to content

debugger: check -e flag in debug break setup - #8876

Closed
kjin wants to merge 2 commits into
nodejs:masterfrom
kjin:dbg-brk-fix
Closed

debugger: check -e flag in debug break setup#8876
kjin wants to merge 2 commits into
nodejs:masterfrom
kjin:dbg-brk-fix

Conversation

@kjin

@kjinkjin commented Oct 1, 2016

Copy link
Copy Markdown
Contributor
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

module

Description of change

When both --debug-brk and --eval are set, and a filename is
specified, its full path is not set correctly, causing an error
for relative filenames with './' omitted.

For example, 'node --debug-brk -e 0 hello.js' throws an error.

Since the script referenced by the filename is never run anyway,
this change skips resolving its full path if both --debug-brk and
--eval are set.

@nodejs-github-botnodejs-github-bot added the module Issues and PRs related to the module subsystem. label Oct 1, 2016
Comment threadlib/module.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unnecessary whitespace change

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Whoops, updated!

@mscdexmscdex added process Issues and PRs related to the process subsystem. and removed module Issues and PRs related to the module subsystem. labels Oct 1, 2016
When both --debug-brk and --eval are set, and a filename is
specified, its full path is not set correctly, causing an error
for relative filenames with './' omitted.
For example, 'node --debug-brk -e 0 hello.js' throws an error.
Since the script referenced by the filename is never run anyway,
this change skips resolving its full path if both --debug-brk and
--eval are set.

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add a check that verifies the 'foo' argument is not evaluated? Basically, that node --debug-brk -p process.argv[1] foo prints 'foo'.

@kjin

kjin commented Oct 2, 2016

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis I've modified test-debug-brk.js to match the contents of stdout - it checks that node --debug-brk -p process.argv[1] foo does indeed print 'foo'.

Comment threadtest/parallel/test-debug-brk.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tiny style nit: line continuations should have four spaces of indent. The linter is supposed to check that but it's possible it gets thrown off by the binary operator.

Comment threadtest/parallel/test-debug-brk.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you make this a little stricter? E.g. /^\s*foo\s*$/.

@kjin

kjin commented Oct 3, 2016

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis Thanks for taking a look - I've made the requested changes, make lint is error-free.

@kjinkjin changed the title module: check -e flag in debug break setupdebugger: check -e flag in debug break setupOct 3, 2016

@jasnelljasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM if @bnoordhuis and @mscdex are also good with it.

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM too.

@jasnell

Copy link
Copy Markdown
Member

@jasnell

Copy link
Copy Markdown
Member

CI failures appear to be unrelated flaky tests. @mscdex does this LGTY?

@rvagg
rvaggforce-pushed the master branch 2 times, most recently from c133999 to 83c7a88CompareOctober 18, 2016 17:02
@jasnell

Copy link
Copy Markdown
Member

ping @mscdex

@mscdex

mscdex commented Oct 26, 2016

Copy link
Copy Markdown
Contributor

@jasnell I'm not familiar enough with the debugger to really sign off on the (non-test) change, but as far as the one whitespace change I pointed out is concerned, @kjin removed that.

@kjin

kjin commented Nov 14, 2016

Copy link
Copy Markdown
ContributorAuthor

@jasnell It seems like there are no significant build problems with this change, is it ready to be merged in?

@matthewloring

Copy link
Copy Markdown

@matthewloring

Copy link
Copy Markdown

Thanks! Landed in ebff29f.

addaleax pushed a commit that referenced this pull request Nov 22, 2016
When both --debug-brk and --eval are set, and a filename is
specified, its full path is not set correctly, causing an error
for relative filenames with './' omitted.
For example, 'node --debug-brk -e 0 hello.js' throws an error.
Since the script referenced by the filename is never run anyway,
this change skips resolving its full path if both --debug-brk and
--eval are set.
PR-URL: #8876
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

this is not landing cleanly on v4.x. Can someone please do a manual backport?

MylesBorins pushed a commit that referenced this pull request Dec 13, 2016
When both --debug-brk and --eval are set, and a filename is
specified, its full path is not set correctly, causing an error
for relative filenames with './' omitted.
For example, 'node --debug-brk -e 0 hello.js' throws an error.
Since the script referenced by the filename is never run anyway,
this change skips resolving its full path if both --debug-brk and
--eval are set.
PR-URL: #8876
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
When both --debug-brk and --eval are set, and a filename is
specified, its full path is not set correctly, causing an error
for relative filenames with './' omitted.
For example, 'node --debug-brk -e 0 hello.js' throws an error.
Since the script referenced by the filename is never run anyway,
this change skips resolving its full path if both --debug-brk and
--eval are set.
PR-URL: #8876
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
MylesBorins added a commit that referenced this pull request Jan 3, 2017
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) #9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) #8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) #10103
- improved support for generator functions (Teddy Katz)
#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10394
MylesBorins added a commit that referenced this pull request Jan 3, 2017
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) #9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) #9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) #8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) #10103
- improved support for generator functions (Teddy Katz)
#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) #9685
PR-URL: #10394
imyller added a commit to imyller/meta-nodejs that referenced this pull request Mar 2, 2017
 This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
nodejs/node#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
nodejs/node#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) nodejs/node#9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) nodejs/node#8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
nodejs/node#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) nodejs/node#10103
- improved support for generator functions (Teddy Katz)
nodejs/node#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10394
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
imyller added a commit to imyller/meta-nodejs that referenced this pull request Mar 2, 2017
 This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.
Notable Changes:
* build:
- shared library support is now working for AIX builds
(Stewart Addison) nodejs/node#9675
* deps:
- *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
nodejs/node#9847
- *V8*: Destructuring of arrow function arguments via computed
property no longer throws (Michaël Zasso)
nodejs/node#10386)
* inspector:
- /json/version returns object, not an object wrapped in an array
(Ben Noordhuis) nodejs/node#9762
* module:
- using --debug-brk and --eval together now works as expected
(Kelvin Jin) nodejs/node#8876
* process:
- improve performance of nextTick up to 20% (Evan Lucas)
nodejs/node#8932
* repl:
- the division operator will no longer be accidentally parsed as
regex (Teddy Katz) nodejs/node#10103
- improved support for generator functions (Teddy Katz)
nodejs/node#9852
* timers:
- Re canceling a cancelled timers will no longer throw
(Jeremiah Senkpiel) nodejs/node#9685
PR-URL: nodejs/node#10394
Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processIssues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@kjin@jasnell@mscdex@matthewloring@MylesBorins@bnoordhuis@nodejs-github-bot