Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclipse Oxygen.3a, RED 0.8.6.201806181254, pydevd-1.2.0 and runPyDevDebug.py #227

Closed
saskell opened this issue Jun 20, 2018 · 7 comments
Closed
Assignees
Milestone

Comments

@saskell
Copy link

saskell commented Jun 20, 2018

I had a heck of a time following the instructions in http://nokia.github.io/RED/help/user_guide/launching/debug/robot_python_debug.html and getting python debugging to work.

I would get this error: "-m" is not recognized as an internal or external command. See below for details.

I finally hacked runPyDevDebug.py to where it would run - see attached.

So what am I doing wrong?

Thanks!
--saskell
runPyDevDebug.py.txt

Command: D:\local\vpy\Lev3-Robot\Scripts\python.exe d:\local\tools\REDScripts\runPyDevDebug.py -m robot.run --listener C:\Users\sckell\AppData\Local\Temp\RobotTempDir7907313046246815718\TestRunnerAgent.py:52922 -P D:\local\vpy\Lev3-Robot\Lib\site-packages:C:\dev\gitlab\sckell\Lev3-Robot\common:C:\dev\gitlab\sckell\Lev3-Robot -s Lev3-Robot.RegexEventsAttrTNGAuto1659 --variable project_path:C:\dev\gitlab\sckell\Lev3-Robot C:\dev\gitlab\sckell\Lev3-Robot
Suite Executor: Robot Framework 3.0.4 (Python 3.6.4 on win32)
'"-m"' is not recognized as an internal or external command,
operable program or batch file.
Running command: "-m" -u -m pydevd --multiprocess --print-in-debugger-startup --vm_type python --client 127.0.0.1 --port 5678 --file D:/local/vpy/Lev3-Robot/lib/site-packages/robot/run.py "C:\Users\sckell\AppData\Local\Temp\RobotTempDir7907313046246815718\TestRunnerAgent.py:52922" "-P" "D:\local\vpy\Lev3-Robot\Lib\site-packages:C:\dev\gitlab\sckell\Lev3-Robot\common:C:\dev\gitlab\sckell\Lev3-Robot" "-s" "Lev3-Robot.RegexEventsAttrTNGAuto1659" "--variable" "project_path:C:\dev\gitlab\sckell\Lev3-Robot" "C:\dev\gitlab\sckell\Lev3-Robot"

@modrz
Copy link
Contributor

modrz commented Jun 21, 2018

Hi,

It looks like process run command is not created correctly.

Can you try following script:
runPyDevDebug.py.txt

@saskell
Copy link
Author

saskell commented Jun 21, 2018

Thanks modrz!

I tried your file and it failed... it looked like the --listener option was getting munged so I changed this line in LocalPythonDebug() from:

command = [sys.executable, '-u'] + pydevdPath + pydevdArgs + sys.argv[4:]

to:

command = [sys.executable, '-u'] + pydevdPath + pydevdArgs + sys.argv[3:]

Do you agree with this change (full modified file runPyDevDebug.py.txt attached)?

Thanks!
Scott

@modrz
Copy link
Contributor

modrz commented Jun 21, 2018

Actually command creation line should look like:

command = [sys.executable, '-u'] + pydevdPath + pydevdArgs + sys.argv[sys.argv.index('robot.run') + 1:]

@saskell
Copy link
Author

saskell commented Jun 21, 2018

Yes - that's a better more robust implementation. And I tested it out and it works.

I think that version should be committed to the repo (?)

Thanks for your help!

--Scott

@modrz modrz self-assigned this Jun 22, 2018
@modrz
Copy link
Contributor

modrz commented Jun 22, 2018

Ok, thanks for confirmation.
Script will be released with next version.
Moreover it will be fixed to work on linux also.

@saskell
Copy link
Author

saskell commented Aug 7, 2018

I grabbed the latest version today, and am using the latest runPyDevDebug.py without modification just fine.
Thanks!
--Scott

@saskell saskell closed this as completed Aug 7, 2018
@KrzysztofJozefowicz
Copy link
Contributor

released in 0.8.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants