kisstkondoros / codemetrics

VSCode extension which shows the complexity information for TypeScript class members
Other
402 stars 20 forks source link

Running the contributed command:'codemetrics.showCodeMetricsCodeLensInfo' failed. #46

Closed d4nyll closed 6 years ago

d4nyll commented 6 years ago

When I try to turn the Code Lens off, it doesn't work and show me the following error:

Running the contributed command:'codemetrics.showCodeMetricsCodeLensInfo' failed.

I have tried it on Ubuntu 17.10, both on the latest version of VSCode:

Version 1.18.1
Commit 929bacba01ef658b873545e26034d1a8067445e9
Date 2017-11-16T18:34:22.110Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

As well as VSCode Insiders:

Version 1.19.0-insider
Commit 89b158e11cb1c3fe94a3876222478ed2d0549fc8
Date 2017-11-24T06:14:09.459Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Thanks for the tool! Would be happy to provide more details!

kisstkondoros commented 6 years ago

Thanks for reporting the bug! I've tried to reproduce it and while doing it I've discovered a few oddities, but not this one.

Could You please elaborate the project setup? In which files the problem occurs? What do you mean with the following:

turn the Code Lens off

(I actually don't get how that command might be involved in this.)

You can potentially get a bit more information by opening up the devtool (help -> Toogle Developer Tools)

kisstkondoros commented 6 years ago

Ok now I think I got it:

Could it be that you wanted to execute that command manually? e.g. as a keyboard shortcut? If so, the reason for the error is that it is meant to show a quickpick about the details of a codelens. It is not meant to be manually executed.

I think what you might looking for is toggleCodeMetricsDisplayed, but this only hides the code lenses. The different visualization aspects of the extension can be disabled in the workspace settings like this:

    "codemetrics.basics.CodeLensEnabled": false, // hides the code lenses
    "codemetrics.basics.DiagnosticsEnabled": false, // does not pollutes problems view / hover with metrics data
    "codemetrics.basics.DecorationModeEnabled": false, // hides the inline decoration
    "codemetrics.basics.OverviewRulerModeEnabled": false, // hides the markers from the overviewruler (scrollbar)

I hope this was the cause, if not please file a new ticket with more details.

cheers :fireworks:

P.S.: I've figured out some nasty stuff thanks to this issue, v.1.11.2 is in the market ^^