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.

Debugger does not stop at breakpoints in .NET Core 2.1

See original GitHub issue

Environment data

dotnet --info output:

.NET Command Line Tools (2.2.0-preview1-008003)

Product Information:
 Version:            2.2.0-preview1-008003
 Commit SHA-1 hash:  839eccbcaf

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /Users/namc/.dotnet/sdk/2.2.0-preview1-008003/

Microsoft .NET Core Shared Framework Host

  Version  : 2.1.0-preview1-26122-01
  Build    : ecbd4f6c01c29de8bbf0669b5cd571f353065eb0

VS Code version:

Version 1.20.0-insider (1.20.0-insider)
8708c716367d9ea6822c860c1fcfcff4e2034605

C# Extension version: 1.13.1

Steps to reproduce

  1. Download and install a .NET Core 2.1 SDK preview. https://github.com/dotnet/cli/tree/release/2.1.3xx#installers-and-binaries
  2. Create a new netcoreapp2.1 console app: dotnet new console -o /tmp/test
  3. Open VS Code to /tmp/test
  4. Add launch.json settings to .vscode/
    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": ".NET Core Launch (console)",
                "type": "coreclr",
                "request": "launch",
                "preLaunchTask": "build",
                "program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/test.dll",
                "args": [],
                "cwd": "${workspaceFolder}",
                "console": "internalConsole",
                "stopAtEntry": false,
                "internalConsoleOptions": "openOnSessionStart"
            }
        ]
    }
    
  5. Add a breakpoint into Program.cs
  6. Launch debugger

Expected behavior

Debugger stops on breakpoints

Actual behavior

No stop.

/private/tmp/test/bin/Debug/netcoreapp2.1/test.pdb exists, but the console output says

Loaded '/private/tmp/test/bin/Debug/netcoreapp2.1/test.dll'. Module was built without symbols

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
gregg-miskellycommented, Jan 31, 2018

@natemcmaster since things seem to be taking a while to fix the CI problems in this repo, I am attaching a private to this bug. Instructions:

  1. Download csharp-1.14.0-beta3.vsix.zip
  2. Remove the ‘.zip’ file extension
  3. Follow instructions to install: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases
1reaction
natemcmastercommented, Feb 1, 2018

👍

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio debugger doesn't stop on breakpoints
Cause. This problem occurs because ASP.NET debugging isn't enabled on the application. Resolution. To resolve this problem, follow these steps ...
Read more >
Debugging not hit breakpoints in .NET CORE MVC 6 application
NET CORE 1.0 MVC 6 application and I stuck with the debugging point as it stopping hitting yesterday. with number of try I...
Read more >
Debug -> Attached to Process not hitting break points for ...
The breakpoints appear as red, but if I add a new breakpoint then it is marked as “will not be hit” due to...
Read more >
Debugging .NET Core Apps with Visual Studio Code
You don't have to wait for an exception. Setting a breakpoint will stop execution of the app under any circumstances in the debugger....
Read more >
Temporary breakpoint - New feature in Visual Studio 2022
NET Core, Visual Studio. Breakpoints are great help for the developers to debug the code in Visual Studio. Sometimes while debugging an ...
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