Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

breakpoint id not found #67

Closed
smortaz opened this issue Feb 13, 2018 · 4 comments
Closed

breakpoint id not found #67

smortaz opened this issue Feb 13, 2018 · 4 comments
Assignees
Milestone

Comments

@smortaz
Copy link

smortaz commented Feb 13, 2018

image

code:


# FB - 201104096
import math


# First Order ODE (y' = f(x, y)) Solver using Euler method
# xa: initial value of independent variable
# xb: final value of independent variable
# ya: initial value of dependent variable
# n : number of steps (higher the better)
# Returns value of y at xb. 
def Euler(f, xa, xb, ya, n):
      h = (xb - xa) / float(n)
      x = xa
      y = ya
      for i in range(n):
          y += h * f(x, y)
          x += h
      return y

# Second Order ODE (y'' = f(x, y, y')) Solver using Euler method
# y1a: initial value of first derivative of dependent variable
def Euler2(f, xa, xb, ya, y1a, n):
      h = (xb - xa) / float(n)
      x = xa
      y = ya
      y1 = y1a
      for i in range(n):
          y1 += h * f(x, y, y1)
          y += h * y1
          x += h
      return y

if __name__ == "__main__":
    print( Euler(lambda x, y: math.cos(x) + math.sin(y), 0, 1, 1, 1000))
    print( Euler2(lambda x, y, y1: math.sin(x * y) - y1, 0, 1, 1, 1, 1000))
@int19h int19h added the Bug label Feb 13, 2018
@huguesv huguesv added this to the Preview 1 milestone Feb 15, 2018
@karthiknadig karthiknadig self-assigned this Feb 16, 2018
@huguesv
Copy link
Contributor

huguesv commented Feb 16, 2018

I just saw this one (from VS)

@karthiknadig
Copy link
Member

Can you paste the stack here? there is line in screenshot that says "Error removing Breakpoint" with error line there.

@karthiknadig
Copy link
Member

We could add CMD_CLEAR_BREAKS command to pydevd. To clear all the existing breakpoints, instead of attempting to remove them by id. @int19h any suggestions?

@karthiknadig
Copy link
Member

Or passing python-line\tNone\tNone as arguments to CMD_REMOVE_BREAK command should be treated as clear all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants