Live Error Detection While Coding

Errors can be frustrating and time-consuming to deal with, especially when they require multiple runs of the code to be identified and fixed.

As a Roblox developer, the process of identifying and fixing errors can be tedious. A live error detection feature for Roblox Studio would greatly improve the workflow by displaying errors as the code is being written, rather than requiring the code to be run to see the errors. This feature is already present in other IDEs such as Visual Studio 2019 and Visual Studio Code and has proven to be beneficial for improving efficiency and streamlining the development process.

I have had the pleasure of using this feature in other IDEs and can attest to its ability to increase productivity and reduce frustration. It streamlines the development process and allows developers to focus on the creative aspects of coding, rather than being constantly interrupted by debugging.

While experienced programmers may have a more keen eye for spotting errors, it is important to consider the needs of all programmers. This includes those who may not have as much experience, but are still learning and growing in their skills. A live error detection feature would benefit programmers at all levels, by providing immediate feedback on code quality and helping to identify and fix errors more efficiently.

Benefits:

  • Save time by detecting and fixing errors in real-time, rather than having to run the code multiple times to identify errors.
  • Improve efficiency by allowing developers to identify and fix errors as they write their code, rather than having to switch back and forth between writing and testing.
  • Streamline the development process by providing immediate feedback on code quality, allowing developers to write better code faster.

Visual of the real-time error can be seen in the bottom section using Visual Studio 2019

2 Likes

This already exists in the form of red underlines when you attempt to reference a non-existant variable?

Many errors cannot be simply ā€˜foundā€™ without running the code because their input may be a variable which could change at run-time.

1 Like

I agree that Roblox already provides inline error detection through red underlines. However, this is not sufficient when working on larger projects or making significant changes to the code. In these cases, it can be time-consuming to manually scroll or run the code to locate errors or to run the code repeatedly in order to identify errors. A feature that streamlines this process and makes it easier to find and fix errors would greatly improve productivity.

One scenario where an error list would be useful is when you are working on code and you have renamed a module name. To find all the places where the old module name is being used, you can either use the ā€œFind Allā€ feature or run the code to see the errors in the output. However, having an error list would streamline this process and save you time by providing a list of all the errors in your code. This is just one example of the many benefits of having a live error list.

You just showcased a syntax error in the video? Roblox already shows you whatā€™s wrong with underlines (errors, warnings) and is also viewable from the Script Analysis (which Iā€™m assuming youā€™re looking for).

Thereā€™s no way to test runtime errorsā€¦ without running the code itself. The current error detection is already quite pristine.

You should have consistency in your code that you donā€™t have to find and replace module dependencies from running a the game. Your dependency infrastructure should be consistent (i.e, full hierarchy path). This creates a system where changing a location of a module only requires a quick find and replace to fix all errors.

2 Likes

My apologies. I was not aware that it was already implemented and can be found under View > Script Analysis. That is exactly what I was describing to have implemented. Thank you for informing me of this. It will greatly help me while coding. :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.