mRonaldo Posted November 10, 2023 Posted November 10, 2023 Note to Mods : Since I'm new here there I cannot create post other than here . If you find below guide useful please move to guide folder. I'm a newbie to Lua but interested to learn ( albeit at a slow pace ) . The first thing I observed was to find a quick way to script and test. Now I've a windows on VM that I use to practice. Running bluestacks on VM is discouraged due to performance issue. So set up as below. It can be used both in or out of VM. Environment Windows 10/11 Windows 10/11 VM Apps Lua binaries ADB ( Platform Tools ) VSCode Lua Extension GG Lua Intellisense Scrcpy - To view / control phone from PC Setup Install Lua binaries > Update path in environment variable Install ADB > Update path in environment variable Install VSCode Install extensions for Lua and GG Intellisense Setup a default build task for .lua files CODE for default build task { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "push2Phone", "type": "shell", "command": "adb push c:/dev/lua/lw_01.lua ./sdcard/lua/", **** CHANGE THIS LINE AS PER YOUR PATH AND REMOVE COMMENT **** "problemMatcher": [], "group": { "kind": "build", "isDefault": true } } ] } Prerequisites Activate android debugging on phone and link your device via ADB [Optional] Download SCRCPY and run the application How to use Create a script in VScode. Use intellisense extension to format, check syntax errors etc Save Please CTRL + SHIFT + B > This will trigger default build and due to the code above will automatically push the script to desired folder on phone ( Provided the phone is already connected via adb ) Use GG in phone/scrcpy to run the file. This is one quick way to develop + test directly on phone If you have any other tips/tricks related to vscode, feel free to add .
Recommended Posts
Archived
This topic is now archived and is closed to further replies.