Page 1 of 1

Can't start debugging in Visual Studio 2019

Posted: Sun Nov 15, 2020 4:11 pm
by Yagiza
Trying to attach debugger of Visual Studio 2019 to Unity Editor. When I press "Run", it starts building and I get these error messages:

Code: Select all

1>CSC : error CS2007: Нераспознанный параметр: "/analyzerconfig:H:\workspace\DaggerfallUnity\daggerfall-unity\.editorconfig"

Code: Select all

3>CSC : error CS2007: Нераспознанный параметр: "/analyzerconfig:H:\workspace\DaggerfallUnity\daggerfall-unity\.editorconfig"

Re: Can't start debugging in Visual Studio 2019

Posted: Sun Nov 15, 2020 9:29 pm
by Interkarma
I use VS2019 Pro and haven't encountered any issues attaching debug. Just a few possibilities off the top of my head:
  • Check that you're opening project from a clean download of source using Unity 2019.4.10f1 (specifically this version at time of writing).
  • For mod creation, best to download the tagged release matching the current live build. Master branch can be ahead of releases and contain breaking changes if mods are built against it then run in live builds.
  • When setting up VS for the first time, you can select to install the debugging tools for Unity. Check these are installed to VS using Tools > Get Tools & Features. Under Gaming, check that "game development with Unity" is selected.
  • In the Unity editor, go to Edit > Preferences > External Tools and check that "Visual Studio 2019 (Professional)" (or whatever version you have) is selected as the code editor.
  • In case you're using VS Code as opposed to full Visual Studio, I seem to recall there was an issue with debugging a few months back. I don't have any specifics, but I found this forum post. Even if this doesn't apply here, it might help someone else finding this topic later.

Re: Can't start debugging in Visual Studio 2019

Posted: Thu Nov 19, 2020 3:45 pm
by joshcamas
I believe debugging cannot work with mods, since you're not running the c# files directly, but using the runtime compiler

Re: Can't start debugging in Visual Studio 2019

Posted: Sun Nov 22, 2020 1:49 pm
by Hazelnut
You can debug mods as long as you run them as virtual mods, and not a built dfmod on /mods folder.