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

Debugger's list command throws TypeError: Cannot read properties of null (reading 'list') #42775

Closed
cola119 opened this issue Apr 18, 2022 · 0 comments · Fixed by #42776
Closed
Labels
debugger Issues and PRs related to the debugger subsystem.

Comments

@cola119
Copy link
Member

cola119 commented Apr 18, 2022

Version

v17.9.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

$ node inspect -e "const a = 1"
debug> c
debug> list()

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

Debugger should throw ERR_DEBUGGER_ERROR just like sb() command since the runtime context has been already destroyed.

debug> list()
> 1 const a = 1
debug> c
< Waiting for the debugger to disconnect...
< 
debug> list()
node:internal/debugger/inspect_repl:362
      throw new ERR_DEBUGGER_ERROR('Requires execution to be paused');
      ^
debug> sb(1)
node:internal/debugger/inspect_repl:362
      throw new ERR_DEBUGGER_ERROR('Requires execution to be paused');
      ^

What do you see instead?

debug> list()
> 1 const a = 1
debug> c
< Waiting for the debugger to disconnect...
< 
debug> list()
node:internal/debugger/inspect_repl:638
    return selectedFrame.list(delta).then(null, (error) => {
                         ^

Uncaught TypeError: Cannot read properties of null (reading 'list')
    at list (node:internal/debugger/inspect_repl:638:26)
    at REPL3:1:1
    at Script.runInContext (node:vm:139:12)
    at Object.runInContext (node:vm:289:6)
    at REPLServer.controlEval (node:internal/debugger/inspect_repl:578:25)
    at bound (node:domain:421:15)
    at REPLServer.runBound [as eval] (node:domain:432:12)
    at REPLServer.onLine (node:repl:893:10)
    at REPLServer.emit (node:events:527:28)
    at REPLServer.emit (node:domain:475:12)
debug> sb(1)
node:internal/debugger/inspect_repl:362
      throw new ERR_DEBUGGER_ERROR('Requires execution to be paused');
      ^

Additional information

No response

@cola119 cola119 changed the title Debugger's list command throws TypeError: Cannot read properties of null (reading 'list') Debugger's list command throws TypeError: Cannot read properties of null (reading 'list') Apr 18, 2022
@VoltrexKeyva VoltrexKeyva added the debugger Issues and PRs related to the debugger subsystem. label Apr 18, 2022
aduh95 pushed a commit that referenced this issue May 22, 2022
PR-URL: #42776
Fixes: #42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
bengl pushed a commit that referenced this issue May 30, 2022
PR-URL: #42776
Fixes: #42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
juanarbol pushed a commit that referenced this issue May 31, 2022
PR-URL: #42776
Fixes: #42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
cola119 added a commit to cola119/node that referenced this issue Jun 27, 2022
PR-URL: nodejs#42776
Fixes: nodejs#42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
cola119 added a commit to cola119/node that referenced this issue Jun 28, 2022
PR-URL: nodejs#42776
Fixes: nodejs#42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Jul 18, 2022
PR-URL: #42776
Fixes: #42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Jul 31, 2022
PR-URL: #42776
Fixes: #42775
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this issue Oct 10, 2022
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants