I am trying to debug an IronPython script (my company requires IronPython for some tasks) using Visual Studio Code. The version of IronPython has to be executed using the -X:Frames option.
Here's how I would run the script from the command line:
ipy -X:Frames my_script.py
Adding -X:Frames to the "args" launcher property makes it an argument for the script instead of the interpreter which is incorrect:
ipy my_script.py -X:Frames
Is there a way to pass arguments to the interpreter itself?
If it helps, here's my launch configuration:
"launch": {
"configurations": [
{
"name": "My Tests",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "ipy",
"program": "C:\\temp\\my_script.py",
"args": ["-X:Frames"],
"cwd": "C:\\temp",
"env": {},
"envFile": "",
"debugOptions": [
"RedirectOutput"
]
}
]
},
.cmd(Windows) or.sh(macOS/Linux) launcher script and put the path to that as yourpythonPath. (And, even better, you had to create slightly different scripts for debuggerpythonPathand environmentpythonPath…) Hopefully there's a better answer now (or I'm remembering wrong), but if not… that should still work.