Omnisharp-vscode: How to disable `just my code` debugging in vscode omnisharp ?

Created on 3 Jun 2018  路  8Comments  路  Source: OmniSharp/omnisharp-vscode

Thanks for this nice debugging experience.

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.3)

Product Information:
 Version:            2.0.3
 Commit SHA-1 hash:  eb1d5ee318

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.3/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.7
  Build    : 2d61d0b043915bc948ebf98836fefe9ba942be11

VS Code version: 1.22.1
C# Extension version: Not sure how to find it. Please add instructions in template.

Steps to reproduce

Debug any app and you will find :
Skipped loading symbols. Module is optimized and the debugger option 'Just My Code is enabled`.

Expected behavior

I want to configure to load symbols for libraries as well.

Actual behavior

Not able to load symbols for : Skipped loading symbols. Module is optimized and the debugger option 'Just My Code is enabled`.

Use Case

We ship SDK to user for creating apps. To debug the code in libraries, we need to load symbols for our assemblies.

Also, please give instructions on how to use Debugger Console to load symbols and set multiple symbols paths for effective debugging.

Debugger Question

Most helpful comment

@ashishnegi these settings are controlled through launch.json options. See https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md for documentation. The options you will likely want to configure: justMyCode, suppressJITOptimizations and symbolOptions.

All 8 comments

@ashishnegi these settings are controlled through launch.json options. See https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md for documentation. The options you will likely want to configure: justMyCode, suppressJITOptimizations and symbolOptions.

@gregg-miskelly do you know if there is a way to set justMyCode: false when launching the process via the unit test Debug Test command? I couldn't find a launch.json task to set the option in that context and setting on the Attach or Launch targets didn't seem to do the trick. Thanks!

@kburtram I added some instructions to this Wiki page to show how to edit those. Let me know if you have more questions --

https://github.com/OmniSharp/omnisharp-vscode/wiki/How-to-run-and-debug-unit-tests

@gregg-miskelly thanks, that's exactly what I was looking for!

@kburtram I added some instructions to this Wiki page to show how to edit those. Let me know if you have more questions --

https://github.com/OmniSharp/omnisharp-vscode/wiki/How-to-run-and-debug-unit-tests

@gregg-miskelly Hi I've got this warning

Step into: Stepping over operator 'VCanopy.Functions.op_ComposeLeft'. To step into properties or operators, add '"enableStepFiltering": false' to launch.json and restart debugging.

How do I specify '"enableStepFiltering": false' in "csharp.unitTestDebuggingOptions" or where I should do this?

I tried to add this way no luck

    "csharp.unitTestDebuggingOptions": {
        ....
        "enableStepFiltering": false,
        ....
        ....

@Alex2357 Assuming you are debugging a unit test from the C# CodeLens, what you are doing is something that I would expect to work. I don't have the cycles to investigate today, but if you want to open a new issue hopefully I can take a look later.

@Alex2357 Assuming you are debugging a unit test from the C# CodeLens, what you are doing is something that I would expect to work. I don't have the cycles to investigate today, but if you want to open a new issue hopefully I can take a look later.

I was debugging NUnit test using F# Neptune plugin which uses Omnisharp. I will try tomorrow to do this again on another machine to confirm that the mapping for source files worked or not and if it mapping works but "enableStepFiltering": false doesn't I will open new issue.

@Alex2357 This extension's code to debug unit tests would only be used if your unit test is written in C#.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattwoberts picture mattwoberts  路  3Comments

mshinnie picture mshinnie  路  3Comments

jrmcdona picture jrmcdona  路  3Comments

ghost picture ghost  路  3Comments

yufeih picture yufeih  路  3Comments