Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

VS Code error "Cannot activate the 'Debugger for Unity' extension because it depends on..."

Discussion in 'Editor & General Support' started by Olmi, Mar 7, 2020.

  1. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Last night I suddenly started to get this error in VS Code:

    Cannot activate the 'Debugger for Unity' extension because it depends on an unknown 'ms-vscode.charp' extension.

    I wouldn't mind if it was some warning but all Unity related IDE features stopped functioning...

    I haven't installed anything or didn't click any upgrade buttons or anything so this must have been another sneaky background update thing. After a bit of searching now, I found this:

    https://github.com/OmniSharp/omnisharp-vscode/issues/3620

    Seems like it's related to this issue. Suggested fix to downgrade to previous extension version (1.21.12) in VS Code does not function, it throws an error. I'll try to dig more into this but this is really annoying (not to mention it stopped my coding.)

    EDIT:
    Looks like the manual downgrade might have fixed this for now (this post in the same thread):
    https://github.com/OmniSharp/omnisharp-vscode/issues/3620#issuecomment-595458417
     
    Last edited: Mar 10, 2020
    skullthug, dimib, JotaRata and 2 others like this.
  2. timmccune

    timmccune

    Joined:
    Sep 27, 2018
    Posts:
    23
    Thanks for the link @Olmi. It appears to have resolved it for me too.
     
    Olmi likes this.
  3. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Seems to happen here too - and this solved it.
     
  4. Mika_Do

    Mika_Do

    Joined:
    Apr 1, 2015
    Posts:
    11
    Same here, might be worth logging a defect @Microsoft if not already done.
     
  5. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Mika_Do

    Well didn't @Olmi already link to OmniSharp's Github / issues (where the issues was reported) - so I bet they already know...
     
  6. marsplay

    marsplay

    Joined:
    Nov 30, 2013
    Posts:
    3
    Fixed it for me, commented there it might help raising priority
     
  7. PigletPants

    PigletPants

    Joined:
    Sep 19, 2019
    Posts:
    23
    I am getting all the warnings but somehow the debugger still works and C# extension also. Just going to put up with this as they mention in the thread the next stable release will fix it.

    Worst part for me was that I had just written a bug into my code that crashing the unity editor at the exact time I started getting these warnings. I thin this was because I hadn't closed and reopened vs code since this bug in the extension was introduced. It really screwed me up because at first I thought my own bug had caused this. :eek:
     
    Olmi likes this.
  8. dimib

    dimib

    Joined:
    Apr 16, 2017
    Posts:
    50
    Thanks for the solution!

    Anyway, Unity should update it's VScode debugger for Unity extension as it may be 1 line in code to change the dependency.
     
    lihail123 likes this.