简体   繁体   中英

debug python library in visual studio code

Is there a way to set a breakpoint in library and debug step by step in visual studio code? For example,

TestApi.py

from iqoptionapi.stable_api import IQ_Option
iqoptionapi=IQ_Option("test","test")

If I put a breakpoint at iqoptionapi=IQ_Option("test","test") I want it to go to IQ_Option and debug it there as well.

Is this possible in Python? I'm using Python 3.7

I followed this link .

  1. python options was not loaded in add configuration
  2. So I manually added this section
{
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal"
    },

    {
      "name": "Debug Unit Test",
      "type": "python",
      "request": "test",
      "justMyCode": false,
    }

Then I pressed F5 to debug but it skipped.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM