Static var empty - how is this possible? - page 2

 
Dominik Egert:

Since it seems, you are an experienced coder, let me share a File to help your debugging approaches.

The Doc is in the header, but is outdated.

It come uncommented and without support.... 

The most powerful macro is 

DBG_MSG_VAR(x)

which takes any variable of fundamental type.

Do you have an output example? I have already so many debug macros in the code, including profiling, class hierarchy etc. ...

 
Doerk Hilger:

Yes, it did. Thats how i detected it or rather why I started debugging here.

Ok. Seems a corrupted memory issue in this case. Is it reproducible ? Can you provide code ?

May I ask you why you are using static variables there ? They are actually constants.

 
It is a continuation of this project, but not ready to be published.

https://www.mql5.com/en/code/32071

You will love the output and especially the function call tracing.

Hope this provides you enough details.

I've changed all type specific macros to be universal. That's the main advantage.

You can use the parts you like, the function trace needs a little setup at the head of a function for convenience and a replacement macro for return, but all in all I like it very much, because it gives nice output and versatile usage for daily tasks.

My main issue was to have clean output. In the screenshot you see the values of the variables, the current version has them lined up on the right, nicely aligned.

The trace macros will indent output, depending on the call depth you have reached by the functions being traced.


 
Dominik Egert:
It is a continuation of this project, but not ready to be published.

https://www.mql5.com/en/code/32071

You will love the output and especially the function call tracing.

Hope this provides you enough details.

I've changed all type specific macros to be universal. That's the main advantage.

You can use the parts you like, the function trace needs a little setup at the head of a function for convenience and a replacement macro for return, but all in all I like it very much, because it gives nice output and versatile usage for daily tasks.

My main issue was to have clean output. In the screenshot you see the values of the variables, the current version has them lined up on the right, nicely aligned.

The trace macros will indent output, depending on the call depth you have reached by the functions being traced.


Interesting, thanks for sharing.