Search code examples
pythonvisual-studio-codevscode-debugger

Variable Equality Breakpoint not-working in Visual Studio Code


I am working on Python and I am passing a parameter named id to my fucntion and i want to pause the execution for debugging purpose (check the value of response) if and only if the value of id is equal to '586982'.

enter image description here

But the execution is getting paused for all values of id irrespectively of == and =.

I tried the following cases:

  1. id = 586982
  2. id == 586982
  3. id = "586982"
  4. id == "586982"

I tried to find a solution but i am not getting any.

Note: I changed variable name since id is a built in keyword in python but its still not working


Solution

  • I made a simple reproduction and didn't encounter this problem.

    After you entered the expression, you have to press Enter to save the breakpoint.

    For example:

    enter image description here