question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Unbound breakpoint in .net5.0

See original GitHub issue

Environment data

dotnet --info output:

.NET SDKs installed:
  3.1.401 [***]
  5.0.100 [***]

VS Code version: 1.52.1

C# Extension version: 1.23.8

OmniSharp log

A lot of lines like this:

[info]: OmniSharp.OmniSharpWorkspace
        Miscellaneous file: d:\****r\obj\Debug\net5.0\Razor\*****\SurveyPrompt.razor.g.cs added to workspace

Steps to reproduce

  1. Build a .NET5.0 APP based on the blazorserver template.
  2. Set a breakpoint somewhere.
  3. Debug and wait.
  4. The breakpoint is hit.
  5. Then, add a new line above the hit line.
  6. End the debug session.
  7. Start the debug session.
  8. The breakpoint is an unbound breakpoint. In other words, the breakpoint sign is hollow and the breakpoint will not be hit.

Expected behavior

The breakpoint should never be an unbound breakpoint.

Actual behavior

The breakpoint happens to be an unbound breakpoint.

Additional Issues

I reckon that, although not 10/10 for sure, this issue is also relative:

https://github.com/unoplatform/uno/issues/4672

If any additional context and information are needed, I will more than happy to provide for this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mallenswecommented, Dec 31, 2020

I had this same problem just now. Because I am making a Console app I can see in the Terminal that the output is the same as my previous code.

To fix this I stop the debugger and run either of these commands: dotnet run

dotnet build

It seems the debugger might not actually execute the “preLaunchTask” ?

0reactions
Banyccommented, Jan 23, 2021

It turns out that it is not omnisharp…

I forgot to update the program path from netcoreapp3.1 to net5.0 in launch.json. Sorry for this issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unbound breakpoints when debugging in Blazor ...
The breakpoint at the "DoStuff()" method in Part1 class is always hit (in separate .net5 library). The breakpoint at the "IncreaseNum()" method ...
Read more >
Breakpoints in Blazor WASM not being hit after upgrading to ...
NET 6.0, cleaned, and deployed the solution to IIS in debug mode. The breakpoint at line 9 of Counter.Razor.cs remains unbound and does...
Read more >
BreakPoints Are Not Working in Visual Studio - C# Corner
Solution. Ensure that debug configuration, debug flag and full debug info are set on all assemblies. Delete all bin and obj folders and...
Read more >
#VSCode: Handling Debugging Error “Breakpoint set but not ...
I've noticed that sometimes you still get the error “Breakpoint set but not yet bound” after the first try. After you build then...
Read more >
When a Breakpoint Binds or Becomes Unbound
Learn about unbound breakpoints. When a breakpoint can't be bound at the time a call is made, the bind time and create time...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found