37

When starting my project in the debugger (C# .NET Core), it states it's debugging "just my code".

I want to also debug the libraries, and can't see a setting to disable this anywhere in VSCode.

Is it possible to disable?

Revolt64
  • 473
  • 1
  • 4
  • 5
  • Do you have a skipFiles entry in your launch config? That is how you would skip over vendor code for example. See https://stackoverflow.com/questions/48620826/is-it-possible-to-blackbox-vendor-code-when-using-vscodes-node-debugger/48621036#48621036. Perhaps you have a skipfiles entry you could delete or modify. Does an extension set this or a similar value? – Mark Oct 25 '18 at 03:25

3 Answers3

43

For this you need to change the launch.json file. Inside the launch.json file you have to set "justMyCode" to false.

As described here. (I was pointed to that link through this post on the Visual Studio Code site.)

Geshode
  • 2,498
  • 5
  • 15
  • 24
  • 1
    That's for Visual Studio full, not Visual Studio code – Revolt64 Oct 25 '18 at 03:01
  • @Revolt64 Sorry, I misread that. I edited my answer for Visual Studio Code. – Geshode Oct 25 '18 at 03:29
  • Edit: I had this in my launch.json file already, but due to it being at the bottom of the array and me accidentally adding a comma after the justMyCode line, it didn't work (that's what I get for a simple mistake). After removing the comma, it works. Thanks for the help! – Revolt64 Oct 25 '18 at 14:05
  • justMyCode is not a valid configuration for launch.json in vscode – Rayee Roded Aug 23 '19 at 18:43
  • In order to avoid redundant exceptions previous to the desired breakpoint, disable `Raised Exceptions` checkbox – cpinamtz Mar 22 '20 at 13:49
39

Just adding "justMyCode": false to launch.json doesn't work. You need to add a separate config in launch.json like below. FYI each {} represents a config.

"configurations": [
        {
           .... # existing config
        },
        {
            "name": "Debug Unit Test",
            "type": "python",
            "request": "test",
            "justMyCode": false,
        }
    ]

As pointed out in here

Tenzin -
  • 491
  • 4
  • 8
  • 1
    Thank you! I had this issue. I put just my code "false" but I couldn't see frameworks libraries. So I changed the launch configuration as u said et voilà – Shil Nevado Sep 27 '19 at 08:10
  • 1
    This doesn't work for me. It's saying **Property is not allowed** for justMyCode (I'm using visual studio code 2018) – cluis92 Aug 26 '20 at 15:39
  • Hi there, I was using vscode 2019 during that time and It still works in vscode 2020. – Tenzin - Aug 28 '20 at 11:49
1

In the documenentation of Visual Studio Code they have a section "Skipping uninteresting code".

VS Code Node.js debugging has a feature to avoid source code that you don't want to step through (AKA 'Just My Code').
This feature can be enabled with the skipFiles attribute in your launch configuration. skipFiles is an array of glob patterns for script paths to skip.

In your launch.json file you have to add (or any other file you want to skip):

  "skipFiles": [
    "${workspaceFolder}/node_modules/**/*.js",
    "${workspaceFolder}/lib/**/*.js"
  ]
Hypenate
  • 1,346
  • 2
  • 15
  • 27