LoginLogin
Might make SBS readonly: thread

Debugging In Lowerdash 0.6

Root / Submissions / [.]

kldck_hulCreated:

Lowerdash 0.6 introduces new debugging features! Here's how to use them

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Throwing an error

━━━━━━━━━━━━━━━━━━━━━━━━ If something is going wrong, use the ERR command. It will print your message, as well as a summary of the runtime's current memory and scope data. If the code is compiled in debug mode, this will print the callstack out as well. example
IF me("status%") < 0 THEN ERR "I made a mistake!"

Seeing the flow of control

━━━━━━━━━━━━━━━━━━━━━━━━━━━ Wondering what module is executing when your game suddenly stops working? Use the callstack!

1. Enable debug compiling

To enable debug compiling put _debug before importing any files you want to debug. example
LOAD "PRG2:LOWERDASH_C",0: USE 2

head
━━━
_debug
import "_SCREEN"
import "_BALL"
hend

2. Crash your Game

You know how...

3. Call _callstack

This will print out the current callstack state with file names and line numbers.

No posts yet (will you be the first?)