FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

debugger: add string validation for watch(expr) of `node inspect` by cola119 · Pull Request #42913 · nodejs/node · GitHub

/ node Public

debugger: add string validation for watch(expr) of node inspect - #42913

Closed
cola119 wants to merge 1 commit into
nodejs:mainfrom
cola119:add-string-validaton-for-watch
Closed

debugger: add string validation for watch(expr) of node inspect#42913
cola119 wants to merge 1 commit into
nodejs:mainfrom
cola119:add-string-validaton-for-watch

Conversation

cola119 commented Apr 29, 2022
edited
Loading

Copy link
Copy Markdown
Member

watch(expr) command of node inspect can accept non-string values, which result in inconsistent bugs.
This PR added the string validation to prevent this issue.

Before

$ node inspect -e "console.log()"
debug> watch()
debug> watch(1)
debug> watchers
  0: undefined = '<Invalid parameters>'
  1: 1 = '<Invalid parameters>'

After

$ node inspect -e "console.log()"
debug> watch()
node:internal/validators:119
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

Uncaught:
TypeError [ERR_INVALID_ARG_TYPE]: The "expression" argument must be of type string. Received undefined

cola119 changed the title debugger: add string validation for watch(expr) debugger: add string validation for watch(expr) of node inspect Apr 29, 2022
nodejs-github-bot added debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels Apr 29, 2022
cola119 closed this Feb 19, 2023
cola119 deleted the add-string-validaton-for-watch branch February 20, 2023 01:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL