Home > Net >  In VS Code Test Explorer, How to turn off the "play" icon in gutter?
In VS Code Test Explorer, How to turn off the "play" icon in gutter?

Time:07-22

In VS Code, with the Python, Text Explorer, and Python Test Explorer extensions, I am able to unit test great with pytest.

But two of the "gutter" icons interfere with each other, and I canoot figure out how to remove one of them.

Background

There are two different windows for Test Explorer with this setup - one for the base Test Explorer, and one for the Python Test Explorer extension. They work basically the same but I find the organization of the tests better in the Python one, so I use that.

In the test code itself, there are various code lenses applied, and other decorators, that allow you to interact with the tests by running, debugging, opening that test in the test explorer window, etc.

These decorators include an icon that shows up in the gutter, which allows you to run the test, then changes afterward to show success or failure. If you right-click on that icon you get multiple test options, as shown below. There is also a secondary icon showing the status behind the triangle "play" icon in the image below:

  • Image of gutter icon for testing and right-context menu

The settings for test explorer allow removing the secondary icon in the background (the faint green circle with the checkmark behind the bright triangle "play" icon), with a setting called "Test Explorer: Gutter Decoration". Changing that removes this secondary icon:

  • Gutter Decorator True: enter image description here
  • Gutter Decorator False: enter image description here

Question

So, my question is - how do I remove the Test Explorer "play" icon from the gutter?

This icon appears to be the main icon connected to the main Test Explorer UI, rather than the Python one (the commands will go to the main UI window and run it's test runs, rather than the Python window). It gets in the way of the status gutter icon behind it that shows the status of the Python test runs and is unnecessary in my setup.

I recently had my PC wiped and I used to have this turned off somehow, but I can't find the setting now. Thanks!

CodePudding user response:

Please try to delete Test Explorer extension. This extension is no longer updated.

CodePudding user response:

It turns out the Test Explorer extension is no longer being updated, per MingJie-MSFT's answer, as it appears the extension was integrated into the main VS Code codebase.

This led me to search the settings again, and I found that most of the settings from the extension (search for "Test Explorer") are now duplicated in another section called "Testing".

So, it turns out the play icon was showing up from the new integrated test explorer, not from the extension. So I was able to shut it off in the new setting: enter image description here

However, per MingJie-MSFT's answer, the Test Explorer extension is no longer being maintained, so unless the Python specific Test Explorer extension UI was integrated into VS Code as well, at some point this alternate UI (which I prefer some of the design decisions) will likely no longer be available.

  • Related