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

Evaluate request returns null result if variable has None value. #985

Closed
mfussenegger opened this issue Jul 14, 2022 · 0 comments
Closed
Labels
bug Something isn't working P2

Comments

@mfussenegger
Copy link

mfussenegger commented Jul 14, 2022

Environment data

  • debugpy version: 1.6.2
  • OS and version: Archlinux
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10
  • Using VS Code or Visual Studio: Using nvim-dap

Actual behavior

Server returns:

{
  "seq": 20,
  "type": "response",
  "request_seq": 11,
  "success": true,
  "command": "evaluate",
  "body": {
    "result": null,
    "variablesReference": 0,
    "presentationHint": {}
  }
}

Expected behavior

{
  "seq": 20,
  "type": "response",
  "request_seq": 11,
  "success": true,
  "command": "evaluate",
  "body": {
    "result": "None",
    "variablesReference": 0,
    "presentationHint": {}
  }
}

In the specification the EvaluateResponse has result: string. (Not nullable, not optional).

Steps to reproduce:

Create a file with:

x = None
print(x)

Set a breakpoint at print(x) and trigger a evaluate request with expression = x and context = 'repl'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

No branches or pull requests

2 participants