Define a variable with a value at line 1 of your code. set the breakpoint there and go step by step through it all. global vars, static data and constructors of global objects are initialized before OnInit().
int __debug=0;
If the debugger doesn’t even get to that point, then its a library or DLL with static data which kills your EA.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Debugging my EA, I am getting:
Journal: 2025.09.03 07:37:44.290 MQL5 debugger Critical error while running expert 'PolishedGoldEA (XAUUSD,M15)'. Unknown error.
The Debug tab shows no Trace data at the error.
I searched Forum for Debug Critical Error and it said that the error information will be on the Journal tab, but it is not.
How do I find out What the Error is and Where the error is occurring?
Much Thanks.