i have a few answers
ok im not sure what you mean by the debugger crashes as far as i know this is not true there may be a few probjems with the esckey exit while using the debugger but you just have to close the debugger and it will close the program not sure if this is what you were refering to but this is the only problem ive had with it as for the folding function i am having a problem with it but you cna just set bookmarks and leave your functions open as for the acess variables in a function you must global the variable outside the function and place the variable in the brackets of the funtion like so
global num as integer
num=1
sync on
do
welcome(num)
sync
loop
function welcome(num)
text 10,10,str$(num)
endfunction