debug issues - page 2

 
Vladimir Karputov:

I didn’t understand anything: I can’t understand what exactly you want.

After you have selected "Debugging on real data" (   ) You go to MetaTrader 5 - a new chart will open in the terminal on which debugging will be performed. This is normal. It is right?

This doesn't Happen. 
Once I am taken to MT5 No new Chart is opened The EA Panel which Common Input tabs doesn't even pop up. 
I am taken Back to Metaeditor in less than 2 seconds from pressing F5 while in Metaeditor 

No New Chart is Open. EA Runs OnDeinit. 

 if you set a breakpoint inside the code in MetaEditor. Do you put a breakpoint?

If I set a Break point or Toggle Bookmark or even non at all same thing Happens 



 
Jefferson Metha :

This doesn't Happen. 
Once I am taken to MT5 No new Chart is opened The EA Panel which Common Input tabs doesn't even pop up. 
I am taken Back to Metaeditor in less than 2 seconds from pressing F5 while in Metaeditor 

No New Chart is Open. EA Runs OnDeinit. 

If I set a Break point or Toggle Bookmark or even non at all same thing Happens 



I see only one reason - an error in your code interrupts debugging. View the Experts and Journal tab of the terminal.

 
Vladimir Karputov:

I see only one reason - an error in your code interrupts debugging. View the Experts and Journal tab of the terminal.

I inserted printf functions through out my code and those from Initialisation and deinit are the only Printed infomation in the Expert and Journal Tabs


I run the same code inside two different Broker MT5's debug works perfectly, but on the MT5 i downloaded from metaqoutes  (default MT5) it has this error even the simple code 

int OnInit()
  {
//--- create timer
   EventSetTimer(60);
   printf("Initialisation");
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   int i = 0;
   int j = i+1;
   static int testing;
   testing+= j-1;
   if(testing>j)
    Print("testing");
  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
//---
   
  }
this also has same problem in the default MT5, but on Broker MT5 it procedes to Debugging. 

if the issue was in my code I take it that broker MT5 would also display same behaviour but that isnt the case the case is only on the default version 
Documentation on MQL5: Common Functions / Print
Documentation on MQL5: Common Functions / Print
  • www.mql5.com
Data of double type are shown with the accuracy of up to  16 digits after a decimal point, and can be output either in traditional or in scientific format, depending on what entry will be more compact. Data of float type are output with 5 digits after a decimal point. To output real numbers with another accuracy or in a predefined format, use...