koraykv / zbs-torch

A lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer

Home Page:http://studio.zerobrane.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Description

ZBS-torch is a fork of ZeroBrane Studio to get it to work with Torch-7

For an overview of ZeroBrane Studio, see README-zbs

  • Written in Lua, so easily customizable.
  • Small, portable, and cross-platform (Windows, Mac OSX, and Linux).
  • Auto-completion for functions, keywords, and custom APIs.
  • Interactive console to directly test code snippets with local and remote execution.
  • Integrated debugger (with support for local and remote debugging).
  • Live coding with Lua (demo), Löve 2D (demo), Gideros (demo), Moai (demo), and Corona SDK (demo).
  • Support for plugin-like components:
    • specs (spec/): file syntax, lexer, keywords (e.g. glsl);
    • apis (api/): for code-completion and tool-tips;
    • interpreters (interpreters/): how a project is run;
    • config (cfg/): contains style and basic editor settings;
    • tools (tools/): additional tools (e.g. DirectX/Cg shader compiler...).

Installation

  • Get Torch with luarocks (You can automate this with this script thanks to Clement)
  • Install mobdebug with luarocks with
$ luarocks install mobdebug
$ git clone https://github.com/soumith/zbs-torch.git
$ cd zbs-torch
$ sh zbstudio.sh

Usage

To debug a torch file,

  • Start zbs from the zbs-torch directory with the command
$ sh zbstudio.sh
  • Start the debugger server from "Project->Start Debugger Server"

  • Change the interpreter to Torch-7 "Project->Lua Interpreter->Torch-7"

  • Add the following line to the top of the file you are debugging

require('mobdebug').start()

For Example, this file

require 'image'
print('Wheres Waldo?')
a=image.rotate(image.lena(), 1.0)
image.display(a)
print('OK Bye')

becomes

require('mobdebug').start()
require 'image'
print('Wheres Waldo?')
a=image.rotate(image.lena(), 1.0)
image.display(a)
print('OK Bye')
  • Run the file from the menu "Project->Run"
  • You should see the debugger stop at the first line of the file, then you can set breakpoints, continue, step etc.

Original Author

ZeroBrane Studio and MobDebug

ZeroBrane LLC: Paul Kulchenko (paul@kulchenko.com)

License

See LICENSE file.

About

A lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer

http://studio.zerobrane.com/

License:Other


Languages

Language:Lua 99.1%Language:Shell 0.7%Language:C 0.2%