Tagged: Python debugging
- This topic has 2 replies, 3 voices, and was last updated 5 years, 7 months ago by Aaron Lara.
-
AuthorPosts
-
AlanParticipantI have been able to run (break points don’t really work, but that is a different issue) Python code on Linux in CodeMix (on Amazon Linux-2 AWS Workspace)
HOWEVER, I have NOT been able to run Python code on any Windows machine (I have tried 2 machines).
Here is an abridged version of my launch.json:
{ "version": "2.0.0", "configurations": [ { "name": "Launch scratch.py", "type": "python", "request": "launch", "cwd": "${workspaceFolder}/scripts", "program": "${workspaceFolder}/scripts/scratch.py" } ] }
Here is the Python code (but I get the same result no matter what file I try to run):
import datetime print('datetime imported') try: import requests except Exception as e: print (e) raise print('requests imported') print('started') if __name__=='__main__': print('in main') print('\u215b'.encode('utf8'))
And here is the result in Terminal+:
~/git/jisys (develop) $ cd 'C:\Users\alan\git\jisys/scripts'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\venv\barra-py37\scripts\python.exe' 'c:\Users\alan\.codemix\extensions\ms-python.python-2018.4.0\pythonFiles\PythonToo ls\visualstudio_py_launcher.py' 'C:\Users\alan\git\jisys/scripts' '51052' '34806ad9-833a-4524-8cd6-18ca4aa74f14' 'RedirectOutput,RedirectOutput' 'C:\Users\alan\git\jisys/scripts/test_quovo.py' bash: syntax error near unexpected token '&' ~/git/jisys (develop) $
I have also tried copying the command line, removing the offending “&” –> this always has lead to some other error, but so far has not worked. (BTW, copying the command line means copying to a separate program, like vim, removing the newlines that the copy ends up inserting, and the pasting it back with the “&” removed).
I have also tried installing a completely fresh version of eclipse+CodeMix –> this gives the exact same result.
Any help would be appreciated.
support-swapnaModeratorAlan,
Sorry that you are running into this issue. I see the problem with debugging at my end as well. I have filed a bug for the dev team to look into it.
We will keep you posted about the fix schedule soon.Apologies for inconvenience caused.
–Swapna
Genuitec Support
Aaron LaraMember@Alan, Thank you again for reporthing this issue! I’m happy to announce we fixed it. This and other fixes and improvements will be available next week in our next CodeMix release. We have a pre-release build available and it would be really hepful if you could give it a try to confirm the fix works for you.
To use the preview release, follow these steps:
1. Add the following line to Eclipse/configuration/config.ini
com.genuitec.code.manifest.url=http\://www.genuitec.com/updates/codemix/prerelease/codemix.json
2. Restart Eclipse
3. An update will be detected as shown bottom left — when the update is applied, click the Restart icon to reload Eclipse with the prerelease version of CodeMixCheers!
Aaron Lara -
AuthorPosts