I can’t debug imported module in project in Visual Studio Community 2019

Asked

Viewed 69 times

2

I’m using version 16.7.5 of Visual Studio Community 2019 where I’m implementing for the first time a pyproj (Python version 3.8.3) in a virtual environment env.

I installed the library elasticsearch-dsl in the virtual environment and ran the web application successfully, but while trying to apply a "breakpoint" on any line in the file C:\Users\User\source\repos\MeuProjeto\MeuProjeto\env\Lib\site-packages\elasticsearch_dsl\utils.py I find the following alert:

The breakpoint will not currently be hit. Breakpoint in file excluded by filters.
Note: may be excluded because of "justMyCode" option (default == true).Try setting "justMyCode": false in the debug configuration (e.g., launch.json).


Location: utils.py, line 68...

inserir a descrição da imagem aqui

I searched some solutions for this and found in "Debug > Options > Debugging > General" the box "Enable Just My Code" qualified; however, even when unchecking it, there has been no change.

Is there anything else that can be done for me to try to solve this problem?

2 answers

2


I found the option "Enable debugging of the Python standard library" within "Tools > Options > Python > Debugging" and together with "Enable Just My Code" in "Tools > Options > Debugging > General", the "breakpoint" works now.

1

For you to get debuggar your code, open the launch.json to create the file, right-click on an executable file in the Solution Explorer and choice Debug and Launch Settings, choose the option that best matches your project, open it and add this line json: "justMyCode": false.

Reply link on Soen (for vs code)

microsoft documentation link(en) (visual studio 2019)

  • I need to use the Visual Studio Community, I believe in it I have no access to launch.json, but I could be wrong.

  • Gee, I’m sorry I already found the link and how to create the correct file. I’ll edit the answer

Browser other questions tagged

You are not signed in. Login or sign up in order to post.