Discuss coding questions, pull requests, and implementation details.
- Posts: 120
- Joined: Wed Jul 31, 2019 5:16 pm
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"
- Posts: 5888
- Joined: Sun Mar 22, 2015 1:51 am
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.
- Posts: 68
- Joined: Mon Sep 21, 2020 7:01 am
I believe debugging cannot work with mods, since you're not running the c# files directly, but using the runtime compiler
- Posts: 2517
- Joined: Sat Aug 26, 2017 2:46 pm
You can debug mods as long as you run them as virtual mods, and not a built dfmod on /mods folder.