Activating the debugger rebuilds the complete project every time

Every time I activate/run the debugger the complete project gets rebuild (local source files and library files), this also happens if I only change one line in one source file. It seems strange that building for release works as expected but building for debug rebuilds everything every time. It is a bit time consuming to debug this way.
Is there a way to set dependencies for a debug build? It seem that something in my setup is missing.

Solved: An update to the PlatformIO or the device platform apparently fixed the issue.