From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I am happy that LabVIEW supports Python code with the Python Nodes. But it is difficult to debug errors. A console showing the output of the Python Scripts would be handy.
Enthought's Python Integration Toolkit had this function so I guess it shouldn't be a big thing to add?
> Same problem! Haven't you get an answer for this topic?
This is the idea exchange and the above post is an idea for future improvements, not to solve a problem or get answers. If you want this idea to be considered, you should vote for it (click on the star in the upper left).
I'd like to get your feedback on an unpublished feature that's in LabVIEW 2018 and later. If you edit your INI file to contain "ShowConsoleForPythonNode=TRUE" then a window will open when a Python Node executes to show the output from Python. Would this functionality meet your debugging needs?
Christina Rogers Principal Product Owner, LabVIEW R&D
Hi, i just tried this by adding "ShowConsoleForPythonNode=TRUE" to my LabVIEW INI file but i do not see any console window opening in LabVIEW when a python node executes! am i missing something here? i am using LabVIEW 2023 Q3.
What are our options for debugging in LV2023? On AppleSilicon I can't get VSCode to attach to the process and this flag doesn't show the console anymore so I'm left with no way to debug my code.
I agree that the debugger is better and I shouldn't need the console but as I mentioned in my initial post, I'm on Mac and the debugger doesn't seem to be allowed to connect to the process. The link you provided works fine but it only describes the Windows side of things. On top of that I think that needing the LV environment in order to debug scripts is an incomplete solution at best. Our customers will write python plugins for our application and they won't have access to the source code. The only way I know then for someone in this scenario to connect the debugger is to add a long wait at the beginning of the python script so that the debugger has enough time to connect.
See bellow the error I'm getting from the latest VSCode, Mac mini M2, Python 3.9, latest LV 2023 Q3 and patch
--- Starting attach to pid: 57810 --- (lldb) process attach --pid 57810 error: attach failed: attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)