Debugging: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
28days (talk | contribs)
No edit summary
Line 3: Line 3:
Debugging is the process of adding messages into your code to provide insight of the script's process or working. The debugging helps us to find out where the issue occurs, which can help us where exactly our issue is present or is coming from. The errors in the code can be a huge problem as they can skip the code or crash the server where they occcur.
Debugging is the process of adding messages into your code to provide insight of the script's process or working. The debugging helps us to find out where the issue occurs, which can help us where exactly our issue is present or is coming from. The errors in the code can be a huge problem as they can skip the code or crash the server where they occcur.


This process is based on few different techniques, the first one is to add (print) messages, which can help you which part of the code gets run and what values you are getting. The second technique is to rely on server or client side errors, you can run the game with '''-dev''' launch argument to run the game in dev mode, which prints client side script errors in the chat, and also you can find the errors in your '''%appdata%/local/Onset/Logs/''' folder.
<div class="noprint" style="float:right;">
[[File:clientOption.png|Steam Client Options]]
</div>
 
This process is based on few different techniques, the first one is to add (print) messages, which can help you which part of the code gets run and what values you are getting.
 
The second technique is to rely on server by checking the '''server_log.txt''' or the console window or as for the client, you can run the game with '''-dev''' launch argument to run the game in dev mode, which prints client side script errors in the chat, and also you can find the errors in your '''%appdata%/local/Onset/Saved/Logs/''' folder.
 
Please note that you can '''not''' debug your web UIs with this method, and has to be done externally!

Revision as of 15:34, 18 December 2019

This is a quick newbie guide to what debugging is and how to do it.

Debugging is the process of adding messages into your code to provide insight of the script's process or working. The debugging helps us to find out where the issue occurs, which can help us where exactly our issue is present or is coming from. The errors in the code can be a huge problem as they can skip the code or crash the server where they occcur.

Steam Client Options

This process is based on few different techniques, the first one is to add (print) messages, which can help you which part of the code gets run and what values you are getting.

The second technique is to rely on server by checking the server_log.txt or the console window or as for the client, you can run the game with -dev launch argument to run the game in dev mode, which prints client side script errors in the chat, and also you can find the errors in your %appdata%/local/Onset/Saved/Logs/ folder.

Please note that you can not debug your web UIs with this method, and has to be done externally!