BACKGROUND:
The code in my game file has exceed 10,000 lines and 200 functions so I’ve decided its time to break it into modules 
PROBLEM:
It is extremely difficult to debug timers across modules. I’ve created an example that purposely causes an error (see below). In order for me to properly debug this error I need to know where the timer was created (which file, and which line). The corona debugger doesn’t provide that information.
OLD WORK AROUND:
What I use to do was just run a search on the function being called that caused the error until I found the timer that was calling it. However, now that I’ve broke up the code into many different files that process is very difficult. I must now open each file individual and run a search.
Please let me know any ideas to help with debugging timers across modules. Thanks.
main.lua
[lua]
local heroFunctions = require “heroFunctions”
local gameFunctions = require “gameFunctions”
startGame()
[/lua]
gameFunctions.lua
[lua]
local M = {}
function startGame()
local tempHero
print(“Start Game”)
tempHero = createHero()
print(tempHero)
heroTimer = timer.performWithDelay(1000,moveHero,1)
heroTimer.params = {}
heroTimer.params.object = tempHero
display.remove(tempHero)
tempHero = nil
end
M.startGame = startGame
return M
[/lua]
heroFunctions.lua
[lua]
local M = {}
function createHero()
local hero
print(“Hero Was Created”)
hero = display.newCircle(50,50,50)
return hero
end
M.createHero = createHero
function moveHero( event )
print(“Moved Hero”)
local tempParams
local tempHero
tempParams = event.source.params
tempHero = tempParams.object
tempHero.x = tempHero.x + 50
end
M.moveHero = moveHero
return M
[/lua]