mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Update handlers.py
Add "-X=frozen_modules=off" to cpython interpreter when version==3.11
This commit is contained in:
parent
78b030f509
commit
3e90c5a903
1 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ from debugpy import launcher
|
|||
from debugpy.common import json
|
||||
from debugpy.launcher import debuggee
|
||||
|
||||
# see https://github.com/microsoft/debugpy/issues/861
|
||||
PYTHON_311 = sys.version_info[:2] == (3, 11)
|
||||
|
||||
def launch_request(request):
|
||||
debug_options = set(request("debugOptions", json.array(str)))
|
||||
|
|
@ -38,6 +40,10 @@ def launch_request(request):
|
|||
python = request("python", json.array(str, size=(1,)))
|
||||
cmdline = list(python)
|
||||
|
||||
# see https://github.com/microsoft/debugpy/issues/861
|
||||
if PYTHON_311:
|
||||
cmdline += ["-X", "frozen_modules=off"]
|
||||
|
||||
if not request("noDebug", json.default(False)):
|
||||
port = request("port", int)
|
||||
cmdline += [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue