Preheat the oven to 375 degrees F. Line baking sheets with parchment paper.
In a stand mixer or large bowl using a hand mixer, blend the butter, both sugars, vanilla and eggs. In a medium bowl, stir together the flour, cocoa, baking soda and salt. Gradually add the flour mixture into the butter mixture and blend until combined. Stir in the chocolate chips, coconut and pecans.
Drop the dough by tablespoonfuls onto the prepared baking sheets, 12 cookies per sheet, and bake 8 to 10 minutes. Cool on a baking rack.
To make bars, press the dough into a buttered 8 by 8-inch square baking pan and bake 20 to 25 minutes. Cut into squares when cooled.
Recipe courtesy of Sunny Anderson, 2011