View counter in strapi: With lifecycle hooks? But how to use them?

Thanks for your answer and your improvement!

I just changed the {id: params.id } to {id: result.id } because I don’t know which data is in params but the result has an id.

Generally it’s really hard for me to debug the lifecycle-code. I insert some console.log but I don’t see them in browser or postman. Do you have any tip how to debug these hooks to see the console.log?

Best regards,

Timo