Program doesnt break on breakpoints
Your issue may already be reported! Please search on the issue track before creating one.
Expected Behavior
When the unity process hits a breakpoint, the game stops and VSCode enters break mode.
Current Behavior
When the game hits a breakpoint, it stops for a few seconds and then resumes. No change is seen in VSCode.
Steps to Reproduce (for bugs)
- Start up Unity and open project in VSCode
- Use "Unity Attach Process" command from palette
- Start the game
- Do whatever actions it takes to get to the breakpoint
Your Environment
- Unity Version: 2021.3.1f1 Personal <DX11>
- VS Code Version: 1.71.1 (user setup)
- Version of the debugger tool: 3.0.11
- Operating System and version: Windows 11 21H2 22000.978
I occasionally get this issue, but it seems to fix itself after restarting unity and vscode. Of note is that when it happens, my Call Stack section of the debug tab in vscode doesn't have anything in it. When the breakpoints do work correctly, that section is filled with some threads and thread pools. My versions are slightly different than the listed ones, might be worth trying to update? I'm using VS code version 1.71.2, and unity version 2021.3.5f1.
I can't say for sure what causes it to break, but I think it may be somehow related to static references to other classes? Using the main Unity technologies vscode-unity-debug branch, I end up getting an error when I hover over or try to step into those references, and I think it seems to stop working after I stop debugging after that. Using this fork from deitry seems to fix those errors, instead simply giving me an "unknown identifier" tooltip over the thing I'm highlighting.