#issue with VSCode + Unity

1 messages · Page 1 of 1 (latest)

solid smelt
#

I followed the guide step by step but it seems that the Unity Debugger Extension isn't working correctly, unity successfully made the .csproj and the .sln files which vscode needs, I have Omnisharp also install and set to latest, however when I try to run a C# file so the Unity Debugger can create the vscode launch options, but it doesn't seem to appear:

#

So I manually added the launch option:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Unity Editor",
            "type": "unity",
            "request": "launch"
        }
    ]
}
marsh mesa
#

is VS Code set as your C# editor in Project Settings -> External Tools ?

solid smelt
#

Yes

marsh mesa
#

Have you restarted Unity and / or the PC ?

solid smelt
#

Yes, I also made sure to install the MC Unity Analyser + the omnisharp.json

marsh mesa
#

Hm. I haven't actually used VS Code with Unity, so I cannot help further. Does it work if you switch to VS Community though?

solid smelt
#

It seemed to work fine with VS Community tho that's from past experience, I switched to VSCode recently since I got a different pc

marsh mesa
#

Does it work with VS Community on the PC you're currently using?

solid smelt
#

I'll try and get back to you

#

it seems to work normally/no noticeable issue, my vscode issue tho was this:

#

this runs fine in Unity, this also works with the UnityDebugger normally

#

no idea why it's highlighting it tho

marsh mesa
#

what do the errors say?

solid smelt
#

still works in unity tho

marsh mesa
#

have you configured Unity Tools for VS?

solid smelt
#

you mean the extension?

marsh mesa
solid smelt
marsh mesa
#

regardless, go through the guide again

#

UnityEngine isn't being recognized by VS

solid smelt
#

it's the guide I followed in the first place, not sure what went wrong

marsh mesa
solid smelt
marsh mesa
#

Yes, but I mean with Community

solid smelt
#

Oh mb

marsh mesa
#

VS Community's compiler is better btw, so if you need an excuse to use it there's that :)

#

especially if you're a beginner, Community is heavily recommended. Most people here use it.

#

Community 2022 released earlier in November

#

up from 2019

solid smelt
#

I might switch back to it while using Unity then

#

I just prefer VSCode in most other stuff ¯_(ツ)_/¯

marsh mesa
#

I was looking into using it at the very beginning, but I quickly realized I wanted to Reduce the potential amount of problems, not increase them

#

Anyway, you should get it to work. Just read through the guide again at some later time, when your brain has had a while to unwind.