Leo Fernevak
![]() |
This thread is dedicated to all kinds of debugging-tools which can be useful for scripting.
-------------------------------------------------------------- Recently I added a new function called [Debug Window] to my snippet Text Window Mapscript -- v.03. ![]() This snippet can be downloaded here: http://www.filterforge.com/filters/11647.html And here is more information about the [Debug Window]: http://www.filterforge.com/forum/read...&TID=11511 ![]() To use the [Debug Window] simply edit the filter, copy the central mapscript and paste it into a filter which you wish to debug. (NOTE: Don't copy the Debug Simulation Script, it is only added to show how a debugging situation may appear) After inserting the mapscript into your own filter, you may have to make sure that the text color is set to a readable tone, which is done from one of the mapscript controls. Next, plug in the mapscript you want to debug into the [Text Window Mapscript], through the [Map Input], making sure the [Debug Window] checkbox is set. At first, you will receive this message: "No debugging code found!" This is because you need to set up a [Debug Code] in your source-script. The pre-set [Debug Codes] are: 0.11111 0.22222 0.33333 0.44444 0.55555 0.66666 0.77777 0.88888 0.99999 When these codes are sent through the Alpha Channel from your source script, the [Debug Window] will pick them up and record the values of the Red, Green and Blue channel which were sent with them: "Return number1, number2, number3, 0.11111" While I have tested this mapscript on different settings, I also need feedback regarding any potential bug or problem. The scanning of the Alpha-Channel is using two main variables: 'xstep' and 'ystep'. Lower values for these will cause longer waiting-time but more accurate detection. If the [Debug Window] doesn't find the [Debug Code], either the 'xstep' or 'ystep' may have to be changed. Example of a simulated debugging situation: ![]() |
|
Posted: August 27, 2013 12:40 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,712 Registered Users
+19 new in 30 days!
153,534 Posts
+31 new in 30 days!
15,348 Topics
+72 new in year!
27 unregistered users.