Comments (6)
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.
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.
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.
@gtkvba Did you try this debugger?
from mtasa-blue.
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 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)
- MTA error CL22 (Antivirus blocking) HOT 1
- New event: getAllEventHandler
- onResourceLoadStateChange not triggering HOT 4
- Add new event: onResourceStateChange HOT 2
- svgSetSize / svgGetSize bug with float numbers HOT 1
- Upgrade GitHub actions to support Node.js 20
- onClientMarkerHit edit
- Improved Base Encoding & Decoding
- Water spark effects from water cannons cause marker flickering
- Only 3 water cannons on Fire Truck can be used at the same time HOT 3
- Freeing custom id of an element right after it's destroyed is causing crash HOT 1
- Unable to get remaining ammo (as shown by HUD) HOT 4
- Incorrect colors for 3D draws HOT 6
- Not blended custom animation HOT 2
- dxCreateFont randomly creates fonts with wrong characters HOT 5
- CEF browser crashes when zooming in with leaflet.js HOT 4
- issues with createBuilding HOT 5
- createBuilding crash 0x000096AD HOT 10
- Buildings are not counted to performance stats HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtasa-blue.