OK, looks like the debugger is a single-shot. If you compile and run the debugger, it won't pause at breakpoints. If you close MT5 and reopen it (either directly or by F5 in MetaEditor) it runs the script and pauses at the breakpoints.
And that's it. That's all you get.
Any further attempts (even immediately after the 1st debugging session ends) to run the unchanged .ex5 file will skip all the breakpoints... until after you close MT5 and reopen it again.
Here's the code I'm debugging:
#include <Globals MJM.mqh> // I've got some #defines etc. there along with the ShowLastErrorMsg() function #include <Object routines MJM.mqh> // Where the deficit-compensating functions reside //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { datetime dtDTM0 = D'2021.06.01 00:00:00'; datetime dtDTM1 = D'2021.06.01 07:00:00'; double dPrc0 = 1.418; double dPrc1 = 1.424; string sNmeDP = "DtPrcObj"; ResetLastError(); int iDPIX = ObjectCreate(sNmeDP,OBJ_RECTANGLE,0,0,dtDTM0,dPrc0,dtDTM1,dPrc1); iErr=_LastError; if(iErr>0) ShowLastErrorMsg(iErr,__FILE__+" called by "+__FILE__,__FUNCTION__,__LINE__, " ObjectCreate for <"+sNmeDP+">"); return; }
The breakpoints in question are on the 'string sNmeDP = "DtPrcObj"; ' statement and on the 'return;' statement.
The current beta is 3021.
Does that imply the problem has been fixed in 3021?
The current beta is 3021.
Awesome. I don't have 3021. And I can't find any way to get 3021.
I followed instructions I found at https://www.metatrader5.com/en/releasenotes,
but the /beta switch gave me build 2981 lol.
But then MT5 informed me it downloaded updates, so I restarted the program, updates were applied, and that got me right back to:
So where can I find build 3021?
- www.metatrader5.com
Awesome. I don't have 3021. And I can't find any way to get 3021.
I followed instructions I found at https://www.metatrader5.com/en/releasenotes,
but the /beta switch gave me build 2981 lol.
But then MT5 informed me it downloaded updates, so I restarted the program, updates were applied, and that got me right back to:
So where can I find build 3021?
LMAO nvm. Duhr. Found it.
The current beta is 3021.
OK, 3021 installed and I can confirm the problem I reported has been fixed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This is an inconsistent bug. As soon as I see any pattern I'll report it.
Simple script, 2 or 3 breakpoints, when I click the button or hit F5 to start debugging, the script loads, runs, and skips all the breakpoints.
To get it to work properly I have to close MetaEditor and the MT5 terminal program, then open them again and hit F5.