'Conditional breakpoints in file level in VSCode?

Is it possible to set a conditional breakpoint that breaks on not on a pre-specified line, but on any line of any file of the program, threads?

The vscode doc says you can set a function name based breakpoint:

Instead of placing breakpoints directly in source code, a debugger can support creating breakpoints by specifying a function name; useful in situations where source is not available but a function name is known

Debugging in Visual Studio Code

I thought if one is possible to set such breakpoint, why not one cannot evaluate an expression on every single line of execution of the program. Is it not possible?

I'm currently debugging an Ansible source code. Tracing its execution process takes time if I manually try to figure out what is happening. I believe these tasks would be more easier.

For example when you know one thing that a program displays a message when its error happens you could stringify all local variables and objects and evaluate if some have the message then if it hits breaks on the execution.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source