To make the cookie dough place the butter and sugars into the bowl of a stand mixer and beat together for 5 minutes or until light and fluffy. If using an electric hand mixer or doing this with a wooden spoon this will take longer, just make suer the texture is light and fluffy or the finished dough will be hard to handle and likely to crumble when cut.
Add the vanilla to the butter mixture and beat for 30 seconds to combine. Add the flour in one go and mix on low speed, just until the dough is combined. You want to be careful about over mixing the dough at this stage as it will make the cookies tough and chewy. Add the roughly chopped chocolate and mix briefly just to evenly distribute throughout the dough.
Tip the dough out onto the work surface and use your hands to gently bring together into a ball. A note to those not used to baking this type of cookie. Sometimes not all the flour gets easily incorporated and this can lead to a crumbly hard to handle dough. If when the dough is removed from the bowl there are dry patches use your hands to briefly work the dough a little until a more uniform texture.
Cut the dough into two roughly equal pieces and use your hands to form into rough sausage shapes, about 2 - 2 1/4 inches in diameter. Wrap the logs in clingfilm and refrigerate for two hours before baking.
Preheat the oven to 180C (350F) and line a baking sheet with parchment paper.Remove the logs from the fridge and discard the clingfilm. Brush the dough lightly with a little beaten egg, just moistening the edge. Roll the logs in demerara sugar pressing into the dough.
Use a thin sharp knife to cut the logs of dough into cookies about 1/2 inch thick. Place onto the prepared baking sheets, an inch or so apart. Sprinkle each cookie with a little flaked sea salt and bake in the preheated oven for about 12-15 minutes until just starting to turn golden around the edges. Let cool slightly before transferring to a wire rack to cool completely.