Hi John,
Sorry the documentation didn't quite get updated in time but you are right, IPM 0.7.3 includes a fix to using flexible python runtime. I just added a wiki page on how to use it.
I noticed that you were trying to run `config set UseStandalonePip 1` but missed the `set` word. That means UseStandalonePip is not properly set. But seeing that you successfully installed the package, I think it should fine.
I would recommend trying to import the packages listed in requirements.txt of iterm in an interactive embedded Python shell
do ##class(%SYS.Python).Shell()
and if that works, it means the python dependencies are properly installed and the problem lies somewhere else.
If it doesn't work, maybe the section on incompatible python dependencies in the wiki page can provide some help.
Hi John,
As Raj suggested, we don't currently support debugging in vscode. However, if you are open to interactively debugging from terminal, here're some ideas.
1. If you have a specific part of code you're interested in, I'd recommend manually setting
breakpoint()
orimport pdb; pdb.set_trace()
in your python code. When hitting these lines, pdb will pause the execution of your Python code and drop you into an interactive debugging session. This allows you to inspect variables, evaluate expressions, and step through your code line by line to better understand its behavior and identify any issues. See here for how to use pdb commands.Caveat 1: For the python code defined in an ObjectScript file with [ Language = python ], you won't be able to see python the source code when running
list
(which is a useful pdb command). This is due to Pythonlinecache
module only picking up regular files on your filesystem whereas [ Language = python ] stores the code in the ^ROUTINE global.Caveat 2: If your Python method A calls into an objectscript method B, which calls into another Python method C, this will leave you at the "A" level of call stack. You can't cross the line between Python stack frame to ObjectScript stack frame using
pdb
. But you can move between adjacent Python stack frames.2. If you don't know where you want to start debugging and only want to inspect the state of python after it fails, you can try this internal API, (not guaranteed to work in the future)
This also drop you into an interactive pdb debugging session of the last error. You still have the caveats described above.