Failing to debug with esp32 on Pio

I am trying to debug by interfacing esp32 with jt debugger. I have flashed the code then I am trying to rung and debug but I am getting the error as
“undefinedError: Unknown environment names ‘esp’. Valid names are ‘esp wrover kit’”`;
The complete code of the file platformio.ini is as follows

PlatformIO Project Configuration File
;
; Build options: build flags, source filter, extra scripting
; Upload options: custom port, speed and extra flags
; Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:esp wrover kit]
platform = espressif32
framework = arduino
board = esp-wrover-kit
monitor_speed = 115200
build_flags =
; https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit.html#rgb-led
-D LED_BUILTIN=2

upload_port=COM4`

Thanks in Advance

No spaces in the envrionment name.

it still have environment name with sapces in the below pio example.
“[env:esp wrover kit]”

PlatformIO > Import Project Example > Espressif 32: arduino-blink

platformio.ini

[env:esp wrover kit]
platform = espressif32
framework = arduino
board = esp-wrover-kit
monitor_speed = 115200
build_flags =
	; https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit.html#rgb-led
	-D LED_BUILTIN=2

I had the exact same problem with platformio core version 6.1.5

change [env:esp wrover kit] to [env:esp-wrover-kit] worked for me.