Page 1 of 1

Debugging Methods

Posted: Mon 25. Oct 2010, 18:25
by MrCreosote
When the Compiler finds an error, it states the Line # and Col # where the error occurred.

The problem is that the Line # refers to the line in some kind of compiled form - perhaps where all the #includes are replaced with the code they represent.

In general it makes it difficult to know just where the line is.

Are there any tricks to use to find the line with the error?

Is there any possibility of modifying the compiler to provide more useful information? Even including a copy of the bad line would be a big help even if its source file was not indicated.


Re: Debugging Methods

Posted: Mon 25. Oct 2010, 19:29
by Admin
On the MemBrain homepage download section, as part of the scripting examples there is a zip file that I've again attached to this post.
It describes how to set up the free editor 'PSPad' for editing and debugging MemBrain scripts.

With this setup you can launch script execution/compiling directly from PSPad, where you also have syntax highlighting. If a compiler error occurs your cursor will be automatically directed to the location of interest since PSPad will parse the compiler output of MemBrain.

Give it a try! If you haven't used it up to now it will massively improve your MemBrain scripting experience, I promise!