How do you manage your print/asserts()?

@jay

I even had the code snippet in my snippets collection in CPM…should have looked there in the first place… Ironic huh… [import]uid: 13560 topic_id: 20360 reply_id: 82694[/import]

Here’s the code, I changed it a little but credits goes to the original creator in the link above.

[code]
– type this in the terminal window
–nc -l -k 1234
– Add this to the bottom of your main.lua

– flag to see if the app is beta, set to false when sending to appStore.
local appIsBetaState = true

function printFromDevice(theMessage)
local socket = require(“socket”)
local client = socket.tcp()

local computerIP = “Add your computer ip address here”
local openPort = 1234

client:connect(computerIP, openPort)

if appIsBetaState == true then
client:send(theMessage…"\n")
end

client:shutdown()

client = nil
end

– then where ever you need print from the device

– printFromDevice(" I am now printing from my shiny device")
[/code] [import]uid: 13560 topic_id: 20360 reply_id: 82733[/import]