How To - Debug and Step Into #Include files

Although I believe it would be helpful, I understand the AFL Debugger does not permit a step into an include statement’s code.

Can anyone suggest or post code that could temporarily expand the Include statements for debugging purposes?

#include should only be used for code that was already tested, not for in-development.
With code folding in the editor there is no point in using #includes for development. If you want to have “clean screen” just FOLD code sections.

Keep also in mind, that contrary to say C/C++ IDEs, AmiBroker allows multiple debugging session running at the same time. Which means that every tab in the editor can have debugger running and each tab’s session is independent.

This is so because in AmiBroker there are multiple “programs” (formulas) running in parallel, simultaneously. Not like in normal IDE when you have just one program being developed and run.

2 Likes

I arrived here because I'm trying to debug into an include.

My purpose for having code in a #include is so they can be referenced by many different systems/formulas and modified in one place. It's about the ability to organise code.

This is... inconvenient as it means that I will have to copy the code back into the main formular to debug it. The point of this post is to say that there is valid use cases for debuggers to go into files as they do into functions and procedures.

image

Please carefully read my ENTIRE previous answer marked as "solution". Nothing more to add here.