VScode: remote debugging – missing breakpoints

In preamble, please note I’m a very new user in VScode.

In a current project i’m involved, the workflow is more of less the following one:

  • A main bash script is run to load modules and specific variables
  • The previous script loads a “main.py” python file: its role is to chain different external softs and python codes
  • The external softs ask as well python scripts on his own

The script is run in a remote server (under Linux os whereas i’m under Windows one), but now difficulty now on this topic.

I’m using the Python debugger “attach” and i’m facing the current difficulty

  1. if the first break point is set in the “main.py” file, it’s ok; i can add another ones in the same file tu use continue and so on
  2. however if i add a breakpoint in another python file (python file (2) here after) using either vscode idle (red point) or even a “debugpy.breakpoint()”, it is simply bypassed
  3. if my first breakpoint is set to python file 2, the debugging stops BUT it is waiting for the debugger attach (i’ve no control to run it)

1rst breakpoint add:

    import debugpy
    debugpy.listen(5678)
    print("Waiting for debugger attach")
    debugpy.wait_for_client()
    debugpy.breakpoint()

i guess i should additional information, but which ones ? what am i missing

To summary the program workflow:

bash script   ------> main.py ----------> external soft1 ----> etc
                         |                       |
                         |                       |
                   external soft2          python file (2)

Thanks

Paul

######################################################################
UPDATE
######################################################################
I’ve made a basic example that should reproduce the issue (breakpoints are also missied) – note the main advantage here it prints some information’s i missed in my real program.

The example is composed of 4 files:

  • 2 bash files
  • 2 python files

In practice, type "sh start.sh"

  • File 1: start.sh
#!/bin/bash
python test_breakpoint.py
  • File 2: run_python.sh
#!/bin/bash
python inside_file.py
  • File 3: test_breakpoint.py
import os, subprocess, debugpy

path = os.getcwd()
shfile = "run_python.sh"

# /// DEBUGGING
debugpy.listen(5678)
print("Waiting for Python debugger: attach")
debugpy.wait_for_client()
debugpy.breakpoint()
# /// DEBUGGING

command_line = f"sh {shfile}"
args = command_line.split()
run = subprocess.run(args)
  • File 4: inside_file.py
import debugpy
print("n*** here is a breakpoint ***n")
debugpy.breakpoint()

  • the launch.json file is:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Attach",
            "type": "debugpy",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "justMyCode": true,
            "pythonArgs": [
                "-Xfrozen_modules=off"
            ],
            "env": {
                "PYDEVD_DISABLE_FILE_VALIDATION": "1"
            }
          }
    ]
}

Whatever I implement, the following warning appears and any breakpoint ouside the main python file (test_breakpoint.py here) is ignored …
… what am i missing?

Thanks for your help

0.00s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Waiting for Python debugger: attach

*** here is a breakpoint ***

0.00s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

VScode: remote debugging – missing breakpoints

In preamble, please note I’m a very new user in VScode.

In a current project i’m involved, the workflow is more of less the following one:

  • A main bash script is run to load modules and specific variables
  • The previous script loads a “main.py” python file: its role is to chain different external softs and python codes
  • The external softs ask as well python scripts on his own

The script is run in a remote server (under Linux os whereas i’m under Windows one), but now difficulty now on this topic.

I’m using the Python debugger “attach” and i’m facing the current difficulty

  1. if the first break point is set in the “main.py” file, it’s ok; i can add another ones in the same file tu use continue and so on
  2. however if i add a breakpoint in another python file (python file (2) here after) using either vscode idle (red point) or even a “debugpy.breakpoint()”, it is simply bypassed
  3. if my first breakpoint is set to python file 2, the debugging stops BUT it is waiting for the debugger attach (i’ve no control to run it)

1rst breakpoint add:

    import debugpy
    debugpy.listen(5678)
    print("Waiting for debugger attach")
    debugpy.wait_for_client()
    debugpy.breakpoint()

i guess i should additional information, but which ones ? what am i missing

To summary the program workflow:

bash script   ------> main.py ----------> external soft1 ----> etc
                         |                       |
                         |                       |
                   external soft2          python file (2)

Thanks

Paul

######################################################################
UPDATE
######################################################################
I’ve made a basic example that should reproduce the issue (breakpoints are also missied) – note the main advantage here it prints some information’s i missed in my real program.

The example is composed of 4 files:

  • 2 bash files
  • 2 python files

In practice, type "sh start.sh"

  • File 1: start.sh
#!/bin/bash
python test_breakpoint.py
  • File 2: run_python.sh
#!/bin/bash
python inside_file.py
  • File 3: test_breakpoint.py
import os, subprocess, debugpy

path = os.getcwd()
shfile = "run_python.sh"

# /// DEBUGGING
debugpy.listen(5678)
print("Waiting for Python debugger: attach")
debugpy.wait_for_client()
debugpy.breakpoint()
# /// DEBUGGING

command_line = f"sh {shfile}"
args = command_line.split()
run = subprocess.run(args)
  • File 4: inside_file.py
import debugpy
print("n*** here is a breakpoint ***n")
debugpy.breakpoint()

  • the launch.json file is:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Attach",
            "type": "debugpy",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "justMyCode": true,
            "pythonArgs": [
                "-Xfrozen_modules=off"
            ],
            "env": {
                "PYDEVD_DISABLE_FILE_VALIDATION": "1"
            }
          }
    ]
}

Whatever I implement, the following warning appears and any breakpoint ouside the main python file (test_breakpoint.py here) is ignored …
… what am i missing?

Thanks for your help

0.00s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Waiting for Python debugger: attach

*** here is a breakpoint ***

0.00s – Debugger warning: It seems that frozen modules are being used, which may
0.00s – make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s – to python to disable frozen modules.
0.00s – Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật