Right padding according to max item

var maxItem = 13; // FindMaxItem()
int digits = (int)Math.Floor(Math.Log10(maxItem) + 1);

for(var j = 1; j <= itemsCount; j++){
  
  rowString += $"{j.ToString().PadRight(digits)} ";
  
  // ... ... ...
}

Writing to output window

Example

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Debug.WriteLine("\n\n---------");
            Debug.WriteLine("| start |");
            Debug.WriteLine("-------------------------------------------------------------------------------------------");


            // debug print here


            Debug.WriteLine("-------------------------------------------------------------------------------------------");
            Debug.WriteLine("|  end  |");
            Debug.WriteLine("---------\n\n");
        }
    }
}