Page 1 of 1

VS Code output console

Posted: Sat Jun 01, 2019 8:28 am
by CryptoLogiq
TUTO Output on VS Code of linux :

Create file :

VSCode_love2D

Code: Select all

#!/bin/bash
love $(pwd)

if you launch Love2D on .AppImage :

exemple :

Code: Select all

#!/bin/bash
$HOME'/Documents/Outil/Love/love2d.AppImage' $(pwd)

Vérify your file is executable...


copy the file on /USR/BIN/


in VS Code, opren your project and,

search "Terminal" and type :

VSCode_love2D (or the name of you have save the file in your /usr/bin)

this command execute your project and you have a output in the "Terminal"

bonus !
this function add a color for output :

Code: Select all

function printc(pText, pType)
    local color = {warning = "\x1B[33m", 
                    info = "\x1B[32m", 
                    error = "\x1B[31m",
                    default = "\x1B[m"
                }
    local type = pType or "default"
    io.write(color[type])
    print("** ("..string.upper(type)..") ** "..pText)
    io.write(color["default"])
end
change your print by printc =)