VS Code debugger works when I'm running the project on the host machine but not using a docker-compose enviroment

I develop using VS Code and the debugger works like a charm if Im running the project on the host machine unfortunately I was not able to make it work if I’m developing using a docker-compose enviroment… Does anyone had that same issue and was able to solve it?