I was looking for ways to debug K6 code

I was looking for ways to debug code written in k6. 1 way I found was using k6 run --http-debug but this is more like displaying the output and not similar to the way you will debug the code.

Does anyone has any other recommendation around this?

Hi @anshulgoel2,

There is currently no debugging capabilities with k6.

K6 is based on JS VM called goja which also does not have debugging abilities.

An experiment was made around 2 years ago to add both, and while some success was definitely observed the work was very:

  1. basic
  2. riddled with problems including performance.

At this point the project has been archived.

My experience shows that it is rare that just logging stuff doesn’t help enough and when it doesn’t the usual problem is that the problem happens under load.

Is there a particular problem you are facing?

1 Like