Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode debugger warning on frozen modules

Trying to use the multiprocessing module to run some code. I need to use the python debugger to pass '-Xfrozen_modules=off' but using args or pythonArgs in launch.json doesn't seem to work.

0.01s - 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.

I passed '-Xfrozen_modules=off' using args and pythonArgs in launch.json but that didn't work.

Python 3.11.2

like image 723
a778h6 Avatar asked Apr 06 '26 21:04

a778h6


1 Answers

I ended up added the environment variable "PYDEVD_DISABLE_FILE_VALIDATION" to my launch.json file. For example:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true,
            "env": {
                "PYDEVD_DISABLE_FILE_VALIDATION": "1"
              }
        }
    ]    
}
like image 152
Michael Twohey Avatar answered Apr 09 '26 10:04

Michael Twohey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!