17

I am currently using Flutter with Dart. How do I permanently disable this annoying "Run|Debug" line in vscode?

enter image description here

Axel
  • 4,365
  • 11
  • 63
  • 122
  • 1
    If you disable the settings `Dart: Show Main Code Lens` or `Dart: Show Test Code Lens` does it go away? I don't believe those are built-in to vscode, but are contributed by one of your extensions. – Mark Aug 02 '20 at 07:33
  • @Mark Okay go ahead – Axel Aug 02 '20 at 07:42

6 Answers6

7

Just disable Enable Code Lens in jest plugin.

It's very annoying! When you write test code, small Debug text shows on top of a test (above it method) when it fails.

Debug

During programming, it constantly shows and hides, causing lines of code move up and down a bit. It's terrible experience. Fortunately, easy to disable.

VS Code Configuration

After disabling it, we still have test status feedback:

test feedback

Pawel
  • 3,558
  • 1
  • 25
  • 24
6

That Run | Debug is not built-in to vscode. It must be contributed by one of your extensions. These seem like likely culprits:

Dart: Show Main Code Lens

// Whether to show CodeLens actions in the editor for quick running/debugging scripts with main functions.


Dart: Show Test Code Lens

// Whether to show CodeLens actions in the editor for quick running/debugging tests.


In case people get here because there is a Debug or Run in their package.json, that is a separate issue and answer, see https://stackoverflow.com/questions/62358131/how-to-disable-debug-from-showing-in-package-json/62368407?r=SearchResults&s=1|57.9327#62368407

Mark
  • 143,421
  • 24
  • 428
  • 436
6

Add this line to your settings:

"editor.codeLens": false,

Or do this in settings: code lens annoying in vs code

Arsham Arya
  • 1,461
  • 3
  • 17
  • 25
2

In VSC settings, search for "Pester Code Lens".
You can disable the first option.

Disable Pester Code Lens

Kjel
  • 21
  • 2
1

you just open your vs Code Setting -> Text Editor -> Code Lean [Check mark this Box]enter image description here

enter image description here

Jamirul islam
  • 502
  • 6
  • 10
0

For Java Extension paste this in your settings.json file

"java.debug.settings.enableRunDebugCodeLens": false