Visual studio code breakpoint set to grey color & not working.error(may be excluded because of "justMyCode" option)

Question:

I have set breakpoint in Django core library in visual studio code but when I am starting debugging of my project , those debug point color changed from red to grey & show me notification like below.

Breakpoint in file excluded by filters.
Note: may be excluded because of "justMyCode" option (default == true).

I have set justmycode value to false from visual code option but still I am not able to set breakpoint.

Notification_msg

Even I have read SO question related but not able to solve my issue so I have to post my question.

I have tried to set localroot & remoteroot but not working even.

Asked By: Moon

||

Answers:

You need to set "justMyCode": true in your debug configuration as this is third-party code which is excluded by default.

Answered By: Brett Cannon

are you using a launch configuration to run the debugger? i had the same issue and resolved by adding "justMyCode": false inside the launch.json for the proper entry.

Answered By: Equinox23

Source: https://windowsquestions.com/2020/10/04/cant-set-breakpoint-in-imported-module-visual-studio-community-2019-python-project/

Tools –> Options –> Python –> Debugging –> Check : “Enable debugging of the Python standard library”

Answered By: Greg Mulvihill

I was only able to add Breakpoints to 3rd party libraries when I set 2 options:

  1. on the launch.json file:
    add "justMyCode": false to the configuration.

  2. on Settings>Features>Debug
    Turn on the option Allow Breakpoints Everywhere

  3. (alternative to 2.) on the file settings.json
    add "debug.allowBreakpointsEverywhere": true

Tested on: version: 1.63.2

Answered By: CironAkono

If you work with Typescript, and have tsconfig.json file –> Try setting:

"sourceMap": true

That worked for me

Source Map

Answered By: Pavel