---++ Debugging NPL scripts NPL scripts are compiled at load time; compile time and runtime errors are output to the ./log.txt file. Typically debugging NPL scripts is an iterative process of editing source code, restarting ParaEngine and checking log.txt. However, the following tools can be used to debug NPL scripts more effectively. ---+++ NPL plugins for Visual Studio This provides syntax highlighting, and NPL code completion. ---+++ Visual Assist for Visual Studio This is a must have tool to work with thousands of scripts in a game project. You can search and open files more easily. ---+++ Build Rules for Visual Studio The following MSVC build rules are provided in ./script/bin folder. 1. NPL Build Rule: It offers compile-time error checking in the visual studio IDE. Press Ctrl+F7 to compile code in memory. 1. Lua Run File Rule: It allows one to quickly run pure lua code and see its output in visual studio IDE. ---+++ log(), commonlib.echo(), and log.txt file Litter log(str), commonlib.echo(object) all over buggy code, restart ParaEngine and check ./log.txt. 90% of our programmers are using this primitive way to debug. It is effective once familiarized. ---+++ Use in-game debugger ParaEngine has several open source debuggers written in NPL itself. They can only be used within ParaEngine. Press F12 to access the default debug pannel. ---+++ Use external IDE debugger We recommend http://www.unknownworlds.com/decoda/ It allows the same experience of debugging in visual studio, like setting break points at runtime, step in to and out of code, watch window, etc. In order to use decoda, one needs to ask for the symbol (PDB) file for your version of ParaEngine executable. For each public ParaEngine release executable, we kept its symbol file. The most recent executable and PDB files are on ftp://192.168.0.200/ParaWorld.pdb and ftp://192.168.0.200/paraworld.exe
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2009-07-06
-
LiXizhi
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback