Using the debuggin in MetaEditor

 

Can anyone confirm if the debugging option in the meta editor is working?

I followed the steps in the help topics. I set my Symbol in the Options to EURUSD, my period to 1M. Added a couple of break points, started debugging and nothing happens.


I'm running windows XP 64bit

please let me know if anybody require more info.

 

The debugger works fine.

Use DebugBreak();.Debugger works only for scripts

Fore more info read

The Debugger – a Novelty of MT5

 
dudufx:

The debugger works fine.

Use DebugBreak();.Debugger works only for scripts


And for Expert Advisors too.
 

For a mq5 file with .mqh includes, make sure your source files and .exe are located within the Metatrader directories. That is, move your development code into these directories, and then open these files within the editor and start debugging...

 

I tried to debug a Custom Indicator and nothing happened.  Searching the Help topics was not too helpful.  The Meta Editor User Guide says that

"In order to start debugging, the window of the main file of the project must be active (*.MQ5)."

Then I wanted to find out what the "main file" really means and found this:

"The main file of a project is the MQ5 file that contains the so-called entry points, the set of predefined functions that initialize the working of application (for example, OnInit(), OnStart(), OnChartEvent(), etc.).

Then I looked at some of the Custom Indicators (AMA, Envelopes) which came with the installation and found that they do have OnInit() functions, just like some of the Expert Advisors I looked at (MACD Sample, Moving Average).

So what is the real definition of the "main file"?  Or why can't Custom Indicators be debugged?

Taking this a step further, could Custom Indicators be debugged by using "Step Into" if I called them from a (dummy) expert advisor?

I find it hard to believe that no debugging would be available for Custom Indicators.

 

Thanks in advance... 

Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
 
amuranyi:

I tried to debug a Custom Indicator and nothing happened.  Searching the Help topics was not too helpful.  The Meta Editor User Guide says that

"In order to start debugging, the window of the main file of the project must be active (*.MQ5)."

Then I wanted to find out what the "main file" really means and found this:

"The main file of a project is the MQ5 file that contains the so-called entry points, the set of predefined functions that initialize the working of application (for example, OnInit(), OnStart(), OnChartEvent(), etc.).

Then I looked at some of the Custom Indicators (AMA, Envelopes) which came with the installation and found that they do have OnInit() functions, just like some of the Expert Advisors I looked at (MACD Sample, Moving Average).

So what is the real definition of the "main file"?  Or why can't Custom Indicators be debugged?

Taking this a step further, could Custom Indicators be debugged by using "Step Into" if I called them from a (dummy) expert advisor?

I find it hard to believe that no debugging would be available for Custom Indicators.

 

Thanks in advance... 

Debugging of Custom Indicators isn't supported yet. But we are going to add this option.
Reason: