Difference between revisions of "Remote Debugging"

From The Official Visionaire Studio: Adventure Game Engine Wiki
([Start debug server])
([Final Steps])
Line 47: Line 47:
 
===[Final Steps]===
 
===[Final Steps]===
 
After you started the debug server and added require("mobdebug").start() 1 line over the script you want to debug click on "run game" from the Visionaire Editor.
 
After you started the debug server and added require("mobdebug").start() 1 line over the script you want to debug click on "run game" from the Visionaire Editor.
 +
 +
[[File:Bildschirmfoto_2014-08-01_um_12.02.19.png|400px]]
  
 
Now the debugger stops on the line and you get the informations with an mouseover.
 
Now the debugger stops on the line and you get the informations with an mouseover.
 +
 +
[[File:Final_debug.png|400px]]

Revision as of 15:38, 14 August 2014

Remote Debugging Luascripts

Requirements: Lua Debug Server For example: http://studio.zerobrane.com Quick Instructions Copy & paste the same script to the debugging server and name it as the same as in the Visionaire Editor. Add

require("mobdebug").start()

to the lua script in the Visionaire Editor over the line you would like to debug. Start debug server and run game.

Example Script

local char, pos, testnum

testnum = 0

char = game:getLink(VGameCurrentCharacter)
pos = char:getPoint(VCharacterPosition)

testnum  = testnum + 1

print(testnum)

Usage

[Create the script]

Create the script in the Visionaire Studio Editor.

Remote debug1.png

[Start debug server]

Copy and paste the same script in the ZeroBraneStudio IDE. Save the File as the same name named in the Visionaire Editor (Script0) in our example as you can see in the left in ZeroBraneStudio. Click on "Project -> Start Debugger Server"

2.png

3.png

[Clientsite]

Add

require("mobdebug").start()

over the line you would like to debug in the Visionaire Editor. Make sure you execute this script in game.

[Final Steps]

After you started the debug server and added require("mobdebug").start() 1 line over the script you want to debug click on "run game" from the Visionaire Editor.

Bildschirmfoto 2014-08-01 um 12.02.19.png

Now the debugger stops on the line and you get the informations with an mouseover.

Final debug.png