Debugging scripts

  • #1, by nikitosFriday, 20. February 2015, 18:05 9 years ago
    Hello!

    I am newbie in Visionaire Studio. I have some questions about scripting:
    1) How to check that syntax of script is correct?
    2) How to see some debug console for printing from scripts to it?
    3) Are there any kind of debugger?

    Newbie

    4 Posts


  • #2, by afrlmeFriday, 20. February 2015, 18:16 9 years ago
    Press TAB key to bring up the console when you run your game via the Visionaire Studio editor. Type print log to display the log file contents in the console window.

    David recently added a debugging tool for Lua scripts to VS, but I've not tried using it yet, nor do I know if he implemented it directly into VS yet or whether you still need to use a third party application.

    I myself write my scripts in an application called Sublime Text 3. As for debugging, if something doesn't work then I check the log files generated by VS to see which line(s) are causing offense & the reason / warning why, then I fix my scripts based on that, mostly by trial & error.

    I recommend getting to grips with the editor & action parts themselves first, before you try to get to grips with scripting, as most things can be done without scripting. If you do happen to have a background in scripting / programming & find it more comfortable than the visual design approach, then by all means, delve into the scripting side of things as you please.

    Imperator

    7278 Posts

  • #3, by nikitosFriday, 20. February 2015, 18:21 9 years ago
    Thanks. I see.

    When I print log in console, I see some messages (first) and there are more pages (I see 1/4). How to switch between pages?

    By the way, I am using VS via wine in Linux, so maybe there are any dynamic created file, that I can just tail?

    Newbie

    4 Posts

  • #4, by afrlmeFriday, 20. February 2015, 18:28 9 years ago
    The log file is generated as a .txt or .log file, but I have no idea where it would be placed on your Linux system. I'm not familiar with how Linux or Mac operates.

    You can use the Page Up & Page Down keys to navigate between the log pages when accessing the log via the console.

    Imperator

    7278 Posts