So in short: Fernando Henrique in 1994 made a law where if you don't make a surplus before debt payments, you are a criminal (of the sort that get arrested)
Dilma Rouseff not only made a deficit (instead of a surplus), she made a law to circunvent the previous law, also her law has the pecualiarity that the project that "don't count" in the debts are her party pet projects (the projects that they put on TV to ask for votes), a possible loophole in the law is that she can spend "infinite" money on her pet projects now.
I guess she will be allowed to get away with this because by now the workers party has appointed most of the judges.
Any resemblance with the situation at Venezuela is not mere coincidence, including the situation of the huge state-owned oil monopolies on both countries (Petrobras in Brazil and PDVSA in Venezuela).