Code Monkey home page Code Monkey logo

Comments (6)

caspervonb avatar caspervonb commented on May 18, 2024

Quoting @andysterland from #16

The adapter doesn't yet implement them all but they are all on the short term to do list as the platform in Edge has the capabilities (though setScriptSource only works when not at a breakpoint).

Does this mean the following scenario will not work?

  • Set breakpoint at line 0 of myscript.js
  • Rewrite myscript.js with setScriptSource
  • Resume execution

This is somewhat key to the feature being useful, otherwise you'll get unreachable code in that it will have closures you cannot reach and missing captures.

from edge-diagnostics-adapter.

andysterland avatar andysterland commented on May 18, 2024

@caspervonb you are correct.

Though with any live editing scenario, at a breakpoint or not, you can always get into a state that is nothing like would happen if the edit was applied and the page reloaded. Specifically changing the code doesn't' change the DOM nor does it reverse any affect the code had. Say, if you had a global function named foo and then deleted the code for it the function would still be there and could still be invoked. As you mention closures further complicate the matter :(.

But, you are very right the really useful scenario is when you hit an exception, spot the typo, change it and then set the statement (set statement is awesome!) back one and continue. Alas, it's just not supported in Chakra right now :(.

from edge-diagnostics-adapter.

caspervonb avatar caspervonb commented on May 18, 2024

This is somewhat key to the feature being useful, otherwise you'll get unreachable code in that it will have closures you cannot reach and missing captures.

I was referring to an explicit case in my use case, which is basically rewrite scripts as they are parsed to inject instrumentation)


So to be clear, Chakra's edit and continue feature, cannot actually do edit and continue? What can it do then?

from edge-diagnostics-adapter.

nojvek avatar nojvek commented on May 18, 2024

Chakra has edit on idle. Not edit and continue. They are working on having edit and continue but it requires a large refactor on their side to make it work.

from edge-diagnostics-adapter.

caspervonb avatar caspervonb commented on May 18, 2024

So basically it takes effect on the next call rather than the current call stack?

from edge-diagnostics-adapter.

andysterland avatar andysterland commented on May 18, 2024

@caspervonb exactly. The edit itself won't be carried out till the engine goes back to idle, that is the current stack finishes executing.

from edge-diagnostics-adapter.

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.