Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by lagrier98 · Jun 27, 2018 at 01:52 AM · visual studiodebugging

Breakpoints in Visual Studio debugger are not working

When I hover over the circle next to the breakpoint, I get the following message: “The breakpoint will not currently be hit. Unable to find a corresponding location”.
I’ve tried the following solutions:
- Deleting all files in Library/ScriptAssemblies and restarting Unity (as suggested here)
-Reinstalling Unity
-Reinstalling Visual Studio
-Cleaning and rebuilding my solution in Visual Studio
-Reverting my project to an earlier version and re-adding the changes I want to make to my project
After reverting my project, the debugger started working properly, buy after re-adding the changes, the breakpoints stopped working again
Edit: Also, the compiler is set to debug.

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Glurth · Jun 27, 2018 at 03:16 PM 0
Share

$$anonymous$$ake sure the compiler is set to generate a DEBUG (not release) build. $$anonymous$$inda obvious I know, but I still manage to mess it up often enough.

avatar image Glurth Glurth · Jun 27, 2018 at 04:07 PM 0
Share

ok. Here is another check. This one confirms the debugger is attaching to the correct process. First, make sure the game is NOT playing the Unity Editor. Change the Attach To Unity drop down, to the Attach to Unity and Play option, and click it. Does this make the unity editor start playing? Also, are you using any custom/third-party DLLs?

avatar image lagrier98 Glurth · Jun 27, 2018 at 07:25 PM 0
Share

Clicking Attack to Unity and Play from Visual Studio starts the application in Unity. I use two third-party dlls in my application: $$anonymous$$athNet.Numerics and System.Threading.

avatar image hexagonius · Jun 27, 2018 at 06:27 PM 0
Share

another thing if it's a build for UWP, you need to check build C# projects (or whatever the name in PlayerSettings was)

avatar image lagrier98 hexagonius · Jun 27, 2018 at 07:19 PM 0
Share

I'm, not targeting the Universal Windows Platform.

1 Reply

· Add your reply
  • Sort: 
avatar image
7

Answer by lagrier98 · Jul 04, 2018 at 03:54 AM

After playing around a little bit, I tried deleting .meta files in my project and changing the Api Compatibility Level setting (in Edit->Project Settings->Player) from ".NET Standard 2.0" to ".NET 4.x", and this has resolved the issue.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hobwell · Jun 13, 2019 at 02:22 AM 1
Share

Can confirm, the API Compatiblity Setting switch did the trick, did not need to delete .meta files.

avatar image Marshall119 · Jan 22, 2020 at 10:34 AM 0
Share

I found that just changing the setting to either .NET compatibility level is enough. Seems like toggling it must force a regeneration of symbols.

avatar image seandanger · Feb 16, 2021 at 06:10 AM 0
Share

I tried this a few times and it did not fix the issue for me. I eventually rebooted, updated the Visual Studio Installer, then reinstalled the Unity development package, rebooted again (while standing on one leg and clapping) and after all that breakpoints worked again.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

90 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to debug an Android application in Visual Studio using USB debugging? 2 Answers

Is there a way how to wait for debugger to connect/start and debug built application from VS? 0 Answers

Debugging on device with Visual Studio 2015 0 Answers

How to load symbols for external managed DLLs? 0 Answers

Unable to debug .NET 4.x 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges