How can I debug a self developed MQL4 library using breakpoints?

 

I have developed several libraries which are used by different EAs, indicators and scripts.
But during a debug session it is not possible to debug a library function step by step.
A breakpoint is set in a function in an library but the debugger is not stepping into the function.
Only when I include the source code of the library into the main application, the debugger is jumping into the function.

Since my libraries use global variables with same names it is not possible to include the source code of all libraries into the main application.
All .mq4 and .mqh files are stored in the right folders.

What is missing in my code?
What am I doing wrong?
Or is the debugger in the MT4 editor not capable of debugging libraries at all?

Here is some test code which I used to reproduce the problem.

// Script test_script.mq4
#property strict

#include <test_lib.mqh>

void OnStart()
{
  test_print();

  return;
}
// Header file test_lib.mqh
#property strict

#import "test_lib.ex4"
  void test_print();
#import
// Library test_lib.mq4
#property library
#property strict

void test_print() export
{
  Print( __FUNCTION__ );

  return;
}
 
Tilo Reyer:
Since my libraries use global variables with same names it is not possible to include the source code of all libraries into the main application.

Wrap code from libraries into classes and include them as .mqh files without any problems.

Any of my mql4 projects consists of at least 50 mqh files and I have no problems with including files, since the code is completely object oriented.