Search Issue Tracker

Fixed in 2020.1

Fixed in 2018.3, 2019.1, 2019.3



Found in








Issue ID




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



Reproduction steps:

1. Open "Test" 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 (7)

  1. Aed934ec2afb9cb03b19bfeb27abe332?d=mm


    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.

  2. 2784d3aeac3de6c2da80a460316443b1?d=mm


    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...

  3. 63eb28e1176e9f6c641763274bf6d48e?d=mm


    Oct 23, 2019 15:30

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

  4. 359515feb9a69aa4997ee6fd04b8340f?d=mm


    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

  5. 76697702c16590959986c80adca91380?d=mm


    May 08, 2019 13:05

    ShikenNugget's solution worked for me in Visual Studio 2019

    "Go Project Settings -> Player -> Other Settings and set the API Compatibility level to .NET 2.0 (as opposed to .NET 2.0 Subset). Restart Visual Studio, Clean and Rebuild the solution. This got rid of the warnings for me. "

  6. 799da5837578b2129cc7006bbcdb787b?d=mm


    Feb 12, 2019 18:21

    Still in issue in 2018.3.1f1 and it is a regression. Ugh!

  7. 52812772a74d4ea06fe75e51c3ab9bfb?d=mm


    Jan 30, 2019 01:58

    This has been driving me nuts for months. I do use partial classes in my project, but it also happens in ordinary class files, seemingly at random. A whole file will be like this for days or weeks and then suddenly it works again. There's a thread about it here:

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.