Page 1 of 1

Visual Studio Lua Plugin!

Posted: Mon Jun 29, 2015 10:22 pm
by Matrixmage
Hello!

So I've found a Lua plugin for VS that adds intellisense, debugging, file management, syntax highlighting, and a few other random things here and there. By default the plugin was made to only work for the Pro and Premium versions of VS, but because the project is open source and under the MIT license I did a quick hack so that it can work with all the versions, and now I'm sharing it here for you all to use!

The plugin is called BabeLua and unfortunately doesn't have the greatest quick start guide, so I'm going do a little crash course here on how to set it up.
Quick Start Guide
Quick guide for people who know what they're doing
Super Quick Knowledgeable Guide
Extra/Repeat of information:

Original BabeLua site: http://babelua.codeplex.com/
My modified BabeLua plugin: http://www.mediafire.com/download/71eg3 ... rsion.vsix
Visual Studio Community 2013 page: https://www.visualstudio.com/en-us/prod ... ty-vs.aspx
Lua binaries: https://code.google.com/p/luaforwindows ... e&can=2&q=


Hope this works for everyone and that it augments their modding experience!


Note: Both my modified version and the original are licensed under the MIT license which is included with both downloads and is licensed by each respective author.

Re: Visual Studio Lua Plugin!

Posted: Mon Jun 29, 2015 10:33 pm
by keyboardhack
Nice work with this. I think i will be using this from now on as my modding enviroment.

Will add one thing i noticed when setting up the plugin.
The name of your .lua file has to be in the "Command line" field. so if my lua file is "Derp.lua" then that has to be in the command line awell.
You can at any tine change the field in Projects -> Properties

Re: Visual Studio Lua Plugin!

Posted: Mon Jun 29, 2015 10:46 pm
by semvoz
There's a free Lua plugin which is not bad at all that you get for free (without any hack) when you get IntelliJ community, that's what I am using, it's working pretty well, it offers all the common feature you have with IntelliJ (which is a long long list that I won't provide here :)) the plugin is here but directly obtainable from your IntellIJ instance (options/plugins).

Re: Visual Studio Lua Plugin!

Posted: Tue Jun 30, 2015 4:29 am
by tjmonk15
I found this plugin as well the other day, but I could not get debugging to work within factorio. Were you able to actually debug a mod with this plugin?

- Monk

Re: Visual Studio Lua Plugin!

Posted: Thu Jul 30, 2015 6:36 pm
by johanwanderer
For those of us who are a bit more... old school :)

Lua plugin for Visual Studio 2005:
http://luaforge.net/projects/lualangpack/

Re: Visual Studio Lua Plugin!

Posted: Fri Aug 07, 2015 8:56 pm
by microsoftdotcom
I tried the babelua plugin and it works, but when debugging inside of Visual Studio, the lua.exe command window pops up and closes immediately if the code is correct.
I tried making a testfile.lua with a print("hello") statement and it is still doing this.

How can I fix this guys? I want it to stop closing the lua command window so I can actually see the output that is printed out. Pls help
Thanks in advance

Re: Visual Studio Lua Plugin!

Posted: Fri Aug 07, 2015 9:03 pm
by keyboardhack
microsoftdotcom wrote:I tried the babelua plugin and it works, but when debugging inside of Visual Studio, the lua.exe command window pops up and closes immediately if the code is correct.
I tried making a testfile.lua with a print("hello") statement and it is still doing this.

How can I fix this guys? I want it to stop closing the lua command window so I can actually see the output that is printed out. Pls help
Thanks in advance
Place

Code: Select all

io.read()
at the end of the code.
that will wait for user input before closing the window.

Re: Visual Studio Lua Plugin!

Posted: Fri Apr 22, 2016 11:35 am
by slindenau
tjmonk15 wrote:I found this plugin as well the other day, but I could not get debugging to work within factorio. Were you able to actually debug a mod with this plugin?

- Monk
I'm experimenting with this IntelliJ plugin, and would like to setup debugging. How are you debugging mods within Factorio from Visual Studio?
Do you also have the Factorio API loaded in VS so you get autocomplete & documentation inside VS?