Coder Social home page Coder Social logo

Comments (5)

harold-b avatar harold-b commented on July 30, 2024

I don't currently recall the inner workings of the code off the top of my head, sorry. I'm preoccupied with a project deliverable at the moment so I can't get into it right now either, so you'll have to dig in 🍚 :)

from vscode-duktape-debug.

StephenBloomquist avatar StephenBloomquist commented on July 30, 2024

Yeah I've already looked it into a bit. It doesn't appear to be handling it. From what I can work out getBreakpointsForFile is returning an array of breakpoints with dukIdx in ascending order. They're getting added to the remBPs array in ascending order as well.

If kept this way doRemoveBreakpoints will have to shift all the dukIdx values down every time it calls requestRemoveBreakpoint to keep them in-line with duktape (If you remove index 5, then the breakpoint you have at index 8 would now be at 7, but duktape is being asked to remove at index 8).

I think a better way would be to have the remBPs array sorted such that the dukIdx are in descending order, because then you don't have to care that all the indices above the index you just removed got shifted.

from vscode-duktape-debug.

harold-b avatar harold-b commented on July 30, 2024

If I recall, the packed index were accounted for. I can't quite recall specifics, so I'll have a look when I get the chance to refactor.

from vscode-duktape-debug.

StephenBloomquist avatar StephenBloomquist commented on July 30, 2024

It is accounted for in removeAllTargetBreakpoints but if it's accounted for in setBreakPointsRequest then I've misread some logic somewhere.

from vscode-duktape-debug.

harold-b avatar harold-b commented on July 30, 2024

Thanks, I'll also have a look when I get the chance to dive back in 👍

from vscode-duktape-debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.