Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2018.3.X, 2019.1.X, 2019.3.X

Votes

15

Found in

2017.4.11f1

2018.3.0f2

2018.4.4f1

2019.2.0a1

2019.2.0b7

2019.3.0a7

2020.1.0a1

Issue ID

1118285

Regression

Yes

Unable to find a corresponding location while using Partial classes/methods when debugging

Mono

-

Reproduction steps:

1. Open "Test Project.zip" project and "SampleScene" scene
2. Open "TestClass.Partial" in VS
3. In Line 9 add a Breakpoint
4. Attach to Unity
5. Enter Playmode
6. Hover over the Breakpoint
7. Notice an error "The breakpoint will not currently be hit. Unable to find a corresponding location"

Expected Result: Debugging works as expected with Partial classes/methods
Actual Result: While debugging, unable to find a corresponding location while using Partial classes/methods

Reproducible with: 2017.4.11f1, 2017.4.34f1, 2018.4.13f1, 2019.2.0a8, 2019.2.13f1, 2019.3.0b11, 2020.1.0a13
Not reproducible with: 2017.4.10f1, 2018.4.3f1, 2019.2.0b6, 2019.3.0a6,

Comments (13)

  1. Benczusch

    Nov 16, 2021 16:18

    2020.3.22f1 with VS Enterprise 2019 Version 16.11.6
    I don't see ShikenNugget's post, but relayed by FLIGHTFLIGHT it worked for me. I needed to change to .NET 4.x instead of .NET Standard 2.0

  2. zestandjest

    Apr 10, 2021 05:04

    Happening frequently in 2019.4f20 and 2019.4f24. seeing hard Unity crash followed by inability to use breakpoints. Have not found any consistent steps to recover. Problem persists even after trashing Library, obj and temp folders and starting from scratch.

  3. nadcab0123

    Mar 22, 2021 10:23

    The Article Awesome Thanks for Sharing Provide This is amazing such for good.

  4. tiddles451

    Jan 02, 2021 13:35

    This mysteriously started happening for me today partway through a session. After trying many things it finally went away with:

    Dev studio > Debug > Detach All

  5. Ewanuk

    Dec 29, 2020 14:01

    This issue has NOT been fixed. Why can't I vote on it?

  6. Alex_May

    Nov 03, 2020 10:44

    This is not fixed in 2019.4.4f1.

  7. UDN_1732af66-d409-45ba-80b6-67e19d05edc6

    Oct 05, 2020 21:29

    It's not just partial classes. And ShikenNugget's solution no longer works. I'm on 2020.1.7f1 and Debugging does not work at all. I've tried the above solution and get the same result. Not being able to Debug is a pretty big problem.

  8. hadowmaru

    Oct 29, 2019 16:31

    I have this issue on 2019.2.1 i was using IL2CPP configuration for android, to turn around i switched back to mono and then brakepoints worked again.

    Project Settings > Other Settings > Scripting Backend - Mono, Net Standard 2.0, ARMV 7.

    Note: When i have to build for google i switch back to IL2CPP...

  9. Ziflin

    Oct 23, 2019 15:30

    This is *NOT* fixed in 2019.3.0b4 and is *SUPER* annoying. Please fix again! :)

  10. Twelewen

    Aug 24, 2019 11:30

    Here is a solution how I am able to debug any code without any issue now. I have been having this issue for 5 years so far making me wanna jump out of the window many times. Here is a list of checks I am doing before every debuging sesion and I haven't experienced a single debugging issue since than. Some steps may be ommited probably

    - Detach Visual Studio debuger from Unity
    - Stop unity project running if any
    - Recompile your solution (deploy DLLs into plugin directory)
    - Let Unity recompile imported DLLs
    - Reimport all plugin directory in Unity (wait for the work-in-progress bar)
    - Visual studio start doing dome heavy work (you can check in Task Manager cpu load). You need to wait till it finish processing and if you interrupt this process either by Unity Run button or attaching Visual Studio debuger to Unity you ended up with non-working breakpoints. Wait till you see the heavy cpu work is done in Task Manager - took 20 sec for me.
    - Hit Unity play button and wait till it starts
    - Attach Unity Debugger

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.