Last Modified: 2023-12-21

VS Code

for mac

https://code.visualstudio.com/docs/setup/mac

URLs


### extensions
the following extensions helps your coding with Solar2D simulator.

- Solar2D Autocomplete
- Solar2d Companion for Visual Studio Code
- Local Lua Debugger
- Run Terminal Command


## Local Lua Debugger

For debugging with Local Lua Deubgger, launch.json should be placed in your workspace folder. For instance,














Assuming Kwik projects are located in ~/Kwik folder and this is your workplace folder of Visual Studio Code. launch.json will be created under .vscode/ folder

- ~/Kwik/.vscode/launch.json

  > Corona Simulator.app is specified and ${file} is in the last argurment

  this is for Mac

  ```json
    "version": "0.2.0",
    "configurations": [
      {
        "name": "Debug",
        "type": "lua-local",
        "request": "launch",
          "program": {
            "command": "/Applications/Corona/Corona Simulator.app/Contents/MacOS/Corona Simulator",
          },
          "args": [
            "-no-console"
            "YES"
            "-debug"
            "1"
            "-project"
            "${file}"
          ]
      }
    ]
  }

for Windwos

{
"version": "0.2.0",
"configurations": [{
    "name": "Debug",
    "type": "lua-local",
    "request": "launch",
      "program": {
        "command": "C:\\Program Files (x86)\\Corona Labs\\Corona\\Corona Simulator.exe",
      },
      "args": [
        "/no-console",
        "/debug",
        "${file}"
      ]
  }]
}

Run Terminal Command

this is a utility to run terminal commands. You can select a folder and right click opens a dialog to select a terminal command

You can add a terminal command to settings.json

for Mac

{
  "command":"\"/Applications/Corona/Corona Simulator.app/Contents/MacOS/Corona Simulator\" ./ -no-console YES",
 "name":"Solar2D"
},