Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,345

Using Visual Studio Code with Leadwerks


Josh

3,322 views

 Share

Microsoft has released a cross-platform code editor called "Visual Studio Code". It's just a lightweight text editor like Notepad++. You can get it here for Windows, Linux, and Mac.

 

Although the editor is focused on web development it actually does support Lua syntax highlighting. If you are curious to try to use it with Leadwerks, add this text to your launch.json file:

{
   "version": "0.1.0",
   // List of configurations. Add new configurations or edit existing ones.  
   // ONLY "node" and "mono" are supported, change "type" to switch.
   "configurations": [
       {
           // Name of configuration; appears in the launch configuration drop down menu.
           "name": "Debug",
           // Type of configuration. Possible values: "node", "mono".
           "type": "node",
           // Workspace relative or absolute path to the program.
           "program": "C:\\Users\\Josh\\Documents\\Leadwerks\\Projects\\MyGame\\MyGame.debug.exe",
           // Automatically stop program after launch.
           "stopOnEntry": true,
           // Command line arguments passed to the program.
           "args": ["+debuggerport 5858"],
           // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
           "cwd": "C:\\Users\\Josh\\Documents\\Leadwerks\\Projects\\MyGame",
           // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
           "runtimeExecutable": "C:\\Users\\Josh\\Documents\\Leadwerks\\Projects\\MyGame\\MyGame.debug.exe",
           // Environment variables passed to the program.
           "env": {}
       },
       {
           "name": "Attach",
           "type": "node",
           // TCP/IP address. Default is "localhost".
           "address": "localhost",
           // Port to attach to.
           "port": 5858
       }
   ]
}

 

When you press F5 to launch your game the code editor will attempt to connect to the debug process and fail, but it does work. Sort of.

  • Upvote 1
 Share

3 Comments


Recommended Comments

At first I was interested but then I was just thinking of why I'd need yet another beefed-up text editor next to all those established and good solutions.

  • Upvote 1
Link to comment

One of the appealing things to me is actually a lack of features. Notepad++ has too many menus.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...