Debugging
Setup
Debugging is a crucial part of game development, and with LÖVE Potion, it's simple to set up.
-
Modify or Create conf.lua
If the
game
directory does not already contain aconf.lua
file, create one. With the file created, it should look like this:
function love.conf(t)
t.console = true
end
- Connect Using a TCP Client
- Use any TCP client tool, such as netcat (nc), or a basic TCP socket script to connect to the console's IP address.
- There is no timeout limit, so the console will wait until a connection has been established to it.
Example using netcat (nc)
nc <console_ip_address> 8000
Example using python
main.py
import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
s.connect((sys.argv[1], 8000))
while True:
data = s.recv(1024)
if len(data):
print(data.decode ("utf-8"), end="")
This can be ran by typing python main.py <console_ip_address>
.