Giter VIP home page Giter VIP logo

Comments (3)

Exeteres avatar Exeteres commented on September 25, 2024

Thanks for the issue, I am glad that you are interested in this project!

A few words about CC. When I first saw OC, CC was thought to be outdated, so I didn't pay much attention to it. However, I don't mind if this project also gets CC support. I don't think that we can update the names of the extension and these repositories, but we can update the description and tags to indicate that this project also supports CC.

So there are some notes about debugger:

  • The current implementation of tsdbg is pretty awful, at least because it is tied to OpenOS. Even within the OC this is not acceptable due to the existence of other operating systems. I think that it is necessary to divide the debugger into several modules - to take out the general logic code and separately the implementation of transport, code execution, and so on, depending on the environment.
  • Regarding threads, it is desirable that they represent coroutines. I found it easier to bind debugger threads to OpenOS threads, but that was a mistake. I hope that working with coroutines does not differ in various Lua environments, so there will be no problems with this.
  • About code execution and breakpoints. As you may have noticed, there is no support for breakpoints yet. In OC, for security reasons, there are no necessary functions in debug library. I don’t have time to deal with CC, so I’ll ask directly, are there any such restrictions in CC? I know how to stop the execution of the code at a certain place and collect the values of the variables mentioned in the code, and most likely this way of debugging will be preferable, since it will work in all environments. The main disadvantage is that you cannot apply breakpoints without restarting the program.

To summarize, we have a lot to rewrite and there is a lot of opportunities to add new features. But unfortunately I don't have much time to implement all of this. If you will manage to add CC support, I'll try to take the time to review and accept the changes.

from oc-ts-extension.

m1cr0man avatar m1cr0man commented on September 25, 2024

Thanks for the detailed reply :)

A few words about CC. When I first saw OC, CC was thought to be outdated, so I didn't pay much attention to it. However, I don't mind if this project also gets CC support. I don't think that we can update the names of the extension and these repositories, but we can update the description and tags to indicate that this project also supports CC.

I too thought CC was outdated/abandoned for a while, hence why I ended up using OC and this lib in the first place, however now the opposite seems to be true. Updating docs should be sufficient if this repo/extension supports both mods.

Regarding threads, it is desirable that they represent coroutines

Ok that's good to hear. Breaking up tsdbg would probably be the best way to do this, I don't think it would be sensible for me to shoehorn in CC support in its current state.

The debug library in CC:T appears to be fully functional, although I am asking on Discord for confirmation. This will be the most difficult part for me. Truth be told, I never used the debug library on its own, and I have not written any extensions for VS Code to date, so I have a lot to learn there, but it should be interesting. I saw a discussion about faking preemption in CC coroutines using the debug library which makes it sound like pausing is not a problem, which should allow for a full debugger implementation.

from oc-ts-extension.

Exeteres avatar Exeteres commented on September 25, 2024

Since CC has full support for the debug library, we should definitely take advantage of this. In OC, you can also unlock this library if you patch some files and in emulators like OCEmu it can be done relatively easily. Thus, we have two environments in which we can get a fully functional debugger: CC and patched OC. But we also need to maintain compatibility with the third environment - unpatched OC, and get the most out of what we can do with the locked debug library. That is why I say that the debugger should be modular.

If you have any ideas or suggestions about this, I will be glad to hear them. As I said, I don’t have time to do it myself, but I will try to help as much as I can.

from oc-ts-extension.

Related Issues (1)

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.