作業環境
- Windows 10
- Visual Studio Code
- Python 3.11
内容
multiprocessing
モジュールをインポートして使用すると以下の警告が出力されました。
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.
対応
Google翻訳さんに伺ったところ「適当に引数渡しとけ」と返答されました。
.vscode/launch.json
{ // 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, "pythonArgs": ["-Xfrozen_modules=off"], "env": { "PYDEVD_DISABLE_FILE_VALIDATION": "1", } } ] }