Git Product home page Git Product logo

Comments (6)

Dutchman101 avatar Dutchman101 commented on June 9, 2024 2

Not to be mean, but this sounds like a skill issue to me.. general debugging skills are to be applied to a stack in which one is specialized.

You wrote that you've spent hours adding print statements to get closer to the problem, that's an inefficient debugging session, as you momentarily lacked insight (a sense) of what it could be, as in: what it's likely to be/what makes sense to be the root cause of the chain of failures down the road of the execution of your script. This lack of insight led to wasting time, as it prevented you from adding debug lines in the right places until later on, after much straining.

Proficiency in debugging comes with the ability to see right through certain things and get a good approximation of the problem based on the incorrect behavior and the first results of looking into it/adding tests, and being able to see the bigger picture & knowing what you're working with (and its design) is also crucial for that.

Closing the issue; it's mostly POV and TheNormalnij pointed you in the right direction: if you are looking for such a debugging tool, and you think it lacks functionality that you need, i suggest you contribute to the MTATD repository to have it reflected in the VScode plugin. It's prefered to have MTA Lua debuggers in code editors that are commonplace, over in MTA.

from mtasa-blue.

TracerDS avatar TracerDS commented on June 9, 2024 1

How, in your opinion, would debugging look like?
You dont need a debugger to write good scripts. Only knowledge and output functions is all you need

from mtasa-blue.

gtkvba avatar gtkvba commented on June 9, 2024

How, in your opinion, would debugging look like? You dont need a debugger to write good scripts. Only knowledge and output functions is all you need

Read the issue once again, it wasnt even related to the script itself but to buggy isPedInVehicle implementation.
Code was functioning fine until one day, without any changes made for at least eight months. Despite efforts, I couldn't reproduce the issue in my external development environment, even with identical scripts and input data (and server revision). This left me with one option the most hilarious one - adding print statements to every function on the main server and restarting the scripts, which impacted player gameplay. It all points to one solution: implementing a debugger.

I think that a good debugger is a principle of creating stable software.

How would it look like?

The client would have a debugger tool as an IDE plug-in, which would connect through a socket to the MTA process, and the communication would begin. The server would decide which client can launch the debugger.

from mtasa-blue.

TheNormalnij avatar TheNormalnij commented on June 9, 2024

@gtkvba Did you try this debugger?

from mtasa-blue.

gtkvba avatar gtkvba commented on June 9, 2024

How the fuck u want me to debug code which should work as intended? The issue was in MTA Itself. Sound like a big skill issue to me lmao

from mtasa-blue.

gtkvba avatar gtkvba commented on June 9, 2024

@gtkvba Did you try this debugger?

I haven't tried it because it's server-based, and MTA doesn't have any implementation to do it on the client-side. That's why I created this issue. Also, your project has many issues, like a lack of remote debugging.

from mtasa-blue.

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.