Pastey This No Workie 2

without inline
include euphoria/debug/debug.e  
include std/console.e  
 
integer breadCrumb = 0 
 
procedure debug_printx() 
sequence g, bc 
integer nextIsIt = 0 
 
	bc = "" 
	g = call_stack() 
 
	if breadCrumb then 
		for t=1 to length(g) do 
			-- bc &= g[t][1] & ">" 
		end for 
		-- puts(1,"bc: " & bc) 
	else 
		for t=1 to length(g) do 
			if nextIsIt then 
				puts(1, "\nCalled from " & g[t][1]) 
				nextIsIt = 0 
			else 
				if equal( g[t][1], "debug_print" ) then 
					nextIsIt = 1 
				end if 
			end if 
		end for 
	end if 
	 
--	display( call_stack() )  
end procedure  
 
procedure debug_print() 
	display( call_stack() ) 
end procedure 
  
procedure foo()  
	debug_print()  
end procedure  
  
procedure bar()  
	foo()  
	debug_print()  
end procedure  
 
debug_print()  
foo()  
bar() 
 
wait_key()