Difference between revisions of "Remote Debugging"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "===Remote Debugging Luascripts=== Requirements: Lua Debug Server For example: http://studio.zerobrane.com Quick Instructions Copy & paste the same script to the debugging ser...")
 
m
 
(12 intermediate revisions by 2 users not shown)
Line 28: Line 28:
 
===[Create the script]===
 
===[Create the script]===
 
Create the script in the Visionaire Studio Editor.
 
Create the script in the Visionaire Studio Editor.
 +
 +
[[File:remote_debug1.png|400px]]
  
 
===[Start debug server]===
 
===[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"
 
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"
 +
 +
[[File:2.png|400px]]
 +
 +
[[File:3.png|400px]]
  
 
===[Clientsite]===
 
===[Clientsite]===
Line 41: 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]]
 +
{{toc}}

Latest revision as of 13:50, 13 May 2015

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