Question: How do I pass data from main thread to the method which is running in a different thread continuously? I have a timer in which the value will be continuously incremented and that data will have do be passed to the method in a different thread at each timer tick event. Please help. I don't have much knowledge about threading.

Answer: 
Debugging dojo based application should be the same as debugging any javascript application.

Usually I will follow these steps:

1. **add console.log() somewhere in code**: this is fast and most of time this is enough.
2. **set breakpoint in debugger**: if step 1 is not enough, you can base on error information to set breakpoint before error line, then step in or step out.
3. **comment out recently changes**: for some error which is hard to find the error line, for example, parse error in your case, the good way is comment out your recently changes one by one till back to your last working version. Or, return to your last working version, then add code back one by one.
4. **Create a simple application to reproduce the error** : if your application is very complicate and it is hard for you to follow above methods, you can try to create a new application which mimics your current application but with simple logics and try to reproduce the error.
5. **Based on experience** : Some errors, for example, extra ',' in the end of array which works at chrome and firefox, will report a nonsense error information at IE. Debug these kinds of errors is very difficult, you can base on your experience or do a google search.
Usually what I do in situations like that is to place a breakpoint inside the error callback (line 3398 in your case) and then look into the error variable ("e").

I am not sure how familiar you are with the Web Inspector, but once you hit the breakpoint open the Web Inspector 'console' and check for the error properties "e.message" and "e.stack" (just type in "e.message " in the console).
Also, during development it is better to avoid Dojo optimization / minification, which greatly improve your debug-ability.

Bottom line is to try to place the breakpoint before the error is thrown.