A lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer
Lua Other
Pull request Compare This branch is 47 commits ahead, 654 commits behind pkulchenko:master.
Latest commit 87775dc Feb 1, 2016 @soumith Update README.md

README.md

MOVE TO ZeroBraneStudio: http://notebook.kulchenko.com/zerobrane/torch-debugging-with-zerobrane-studio

You no longer need this fork to use torch in zerobranestudio. The above link shows full integration with Torch.

DEPRECEATED.

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 local and remote debugging for Lua 5.1, Lua 5.2, Lua 5.3, LuaJIT, and other Lua engines.
  • Live coding with Lua, LÖVE, Gideros, Moai, Corona SDK, GSL-shell, and other engines.
  • Function outline.
  • Fuzzy search with Go To File, project-wide Go To Symbol, and Insert Library Function.
  • Several ways to extend the current functionality:
    • specs (spec/): specifications for file syntax, lexer, and keywords;
    • apis (api/): descriptions for code completion and tooltips;
    • interpreters (interpreters/): components for setting debugging and run-time project environment;
    • packages (packages/): plugins that provide additional functionality;
    • config (cfg/): settings for styles, color themes, and other preferences;
    • translations (cfg/i18n/): translations of the menus and messages to other languages;
    • tools (tools/): additional tools.

Installation

  • Get Torch

  • Install mobdebug with luarocks with

$ luarocks install mobdebug
$ git clone https://github.com/soumith/zbs-torch.git
$ cd zbs-torch
$ ./zbstudio.sh

Usage

To debug a torch file,

  • Start zbs from the zbs-torch directory with the command
$ ./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.