Omnisharp-vscode: Debugger does not stop at breakpoints in .NET Core 2.1

Created on 25 Jan 2018  路  14Comments  路  Source: OmniSharp/omnisharp-vscode

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/
    json { "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
Bug Debugger Resolved-Fixed

Most helpful comment

@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

All 14 comments

This is a duplicate of https://github.com/OmniSharp/omnisharp-vscode/issues/1796. You can use the latest beta version to make this work.

Ah my bad, thanks @gregg-miskelly

@gregg-miskelly I tried updating to the 1.14.0-beta2 extension, and I'm still not getting the debugger to attach.

@natemcmaster are you still seeing symbols not load?

FYI I should have sent instructions on how to install a beta extension, in case you want to double check: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases

Yup, same error:

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

Here's my sample project: repro.zip

image

I can reproduce what you are seeing. Taking a look...

It looks like the problem is that something went wrong with publishing the OSX version of the debugger, and so it is still running an old version without the fix.

I figured out our OSX packaging problems and I have a PR out with the fix (https://github.com/OmniSharp/omnisharp-vscode/pull/1985). Once that is merged I will release a new beta.

Thanks @gregg-miskelly. I'm happy to try the new beta when it's available.

@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

馃憤

image

I've tried the different OmniSharp versions, but now I'm not seeing any configuration options in the Debug window. Any ideas?

image

@adredge do you have configurations defined in your launch.json file? If you want help troubleshooting, please open a new issue.

Just in case it help someone, inside the launch.json file make sure this program is pointing to the right version.


// If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/GradeBook.dll",

This worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slevengood picture slevengood  路  3Comments

mattwoberts picture mattwoberts  路  3Comments

jrmcdona picture jrmcdona  路  3Comments

tstivers1990 picture tstivers1990  路  3Comments

jwbay picture jwbay  路  3Comments