PIO Serial Monitor in CLion Not Working

Been trying to use PIO Serial Monitor for a long time and never got it to run. Tried all I can think of and I get the following error:

/Users/petertomich/.pyenv/shims/pio device monitor -e CERBERUS-release
error: Traceback (most recent call last):
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/__main__.py", line 103, in main
    cli()  # pylint: disable=no-value-for-parameter
    ^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/cli.py", line 85, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/device/monitor/command.py", line 152, in device_monitor_cmd
    start_terminal(options)
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/device/monitor/terminal.py", line 54, in start_terminal
    term = new_terminal(options)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/device/monitor/terminal.py", line 102, in new_terminal
    term = Terminal(
           ^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/platformio/device/monitor/terminal.py", line 28, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/serial/tools/miniterm.py", line 395, in __init__
    self.console = Console()
                   ^^^^^^^^^
  File "/Users/petertomich/.pyenv/versions/3.11.3/lib/python3.11/site-packages/serial/tools/miniterm.py", line 198, in __init__
    self.old = termios.tcgetattr(self.fd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
termios.error: (25, 'Inappropriate ioctl for device')

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `python -m pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq/index.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

Running on CLion latest version on latest Mac Ventura 13.5.2 (same problem in previous versions)

Seems like this already tracked in

So this issues seems to be a plugin issue. I have just updated to CLion 2023.2.2
(Build #CL-232.9921.42, built on September 12, 2023) this morning and it is still there. It happens when you try to run monitor from PIO menu or upload and monitor command. However, when you run monitor directly from the command line (pio device monitor -f esp32_exception_decoder -f default -f log2file -f colorize -f debug), it works fine.

Many thanks for your help.

I am seeing the same thing tonight. I am transitioning from VSCode to CLion but having an issue getting the serial monitor to work. Looks like I am getting the same error as was reported here.