Python Forum
pydev error pydev debugger: warning: trying to add breakpoint to file that does not e
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pydev error pydev debugger: warning: trying to add breakpoint to file that does not e
#1
Hello,
I think ther is only a little missing in the settings.
I have a python script where I call a function which is located in a other file.
e.g
script a.py:

....
....
Test()

Script b.py:

def ExitProgr():
print ("bye bye ....!!!!")
sys.exit()

then I can't set a breakpont in script b.py.
I get the error :
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
Pleas could someone give me a tip whats wrong. What does it mean
revise your path mappings.
Thanks a lot in advance
Kurt
Reply
#2
Hello,
sometimes I think I'm the only one worldwide who has this problem. Think
I asked in the eclipse forum and i got this anwer:
Quote:pydev is provided by https://www.pydev.org/ so best you look there for help specifically about the Pydev tools.
Kurt
Reply
#3
Please clarify your description of the problem, perhaps show a bit more code.
Are you importing module 1 into module 2?
This sounds more like an eclipse debugger issue, rather than a python issue.
Perhaps it's time to look at another IDE, VSCode for instance, and should you decide to try this, see: https://python-forum.io/Thread-VS-Code-f...ght=VSCode
Reply
#4
@Larz60+,
danke für Deine Antwort.
Gerne versuche ich das Problem näher zu beschreiben.
Ich habe folgende Scripts:

Das ist das Script Teleskop.py

#!/usr/bin/python
#
# Das ist ein Test!!!
# ===================
#
import sys
sys.path.append(r'/home/pi/pysrc')
import pydevd
pydevd.settrace('192.168.180.33') # replace IP with address
from tkinter import *
from cgitb import text
from _ast import Return
#
#######################################
# Fuer Tersts
#######################################
#
# from InitPyDev import *
from FensterMgr import *
#
print ("Start")
#
# Initialiseiren fuer pydev
# =========================
#
# initpydev()

print ("Einstellfenster\n")
#
#*********************************************
# Hier rufe ich die Funktion von FensterMgr.py
# ********************************************
#
print("X = ",Printme(12))
das ist das Script FensterMgr.py

#!/usr/bin/python
from tkinter import *
from cgitb import text
from _ast import Return
from sys import *
from math import *
# **********************************
# Erstellen und Managen des Fensters
# **********************************
#
    
def Printme(grd):
    print ("Hallo... PRINT meeee")
    x=acos(pi*grd/180)
    y=asin(pi*grd/180)
    print ("X = ", x)
    print ("Y = ", y)
    return(x)
Dann habe ich die Datei pydevd_file_utils.py in den Zeilen 92 - 95 (orginal in meinem script) wie folgt modifiziert:

# example:
PATHS_FROM_ECLIPSE_TO_PYTHON = [
     (r'C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop.py',
      r'/home/pi/raspiproj/Teleskop.py')
     ]
Das Programm lief wie vorgesehen durch aber ich konnte die Breakpoints nicht ausführen. Das Programm lief durch!
Dabei bekam ich diese Meldungen angezeigt:
Quote:warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/pi/pysrc/setup_cython.py" build_ext --inplace' to build.
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
Quote:pydev debugger: warning: trying to add breakpoint to file that does not exist: C:/Users/Kurt/workspace/RemoteSystemsTempFiles/RASPBERRYPI/home/pi/raspiproj/FensterMgr.py (will have no effect)

Kann es sein, dass ich noch den Path für das Script FensterMgr.py in der Datei pydevd_file_utils.py oder sonstwo definieren muß?

Gruß

Kurt
Reply
#5
@Larz60+,
sorry I anwered in german by mistake.
I will write the post in english now.

Thanks for your answer.
I like to try to describe the problem more in detail.
For my program I use the following scripts:
  • Teleskop.py
  • FensterMgr.py
  • pydevd_file_utils.py here I modified the lines 92-95 in the original scrip.

Teleskop.py

#!/usr/bin/python
#
# Das ist ein Test!!!
# ===================
#
import sys
sys.path.append(r'/home/pi/pysrc')
import pydevd
pydevd.settrace('192.168.180.33') # replace IP with address
from tkinter import *
from cgitb import text
from _ast import Return
#
#######################################
# Fuer Tersts
#######################################
#
# from InitPyDev import *
from FensterMgr import *
#
print ("Start")
#
# Initialiseiren fuer pydev
# =========================
#
# initpydev()
 
print ("Einstellfenster\n")
#
#*********************************************
# Hier rufe ich die Funktion von FensterMgr.py
# ********************************************
#
print("X = ",Printme(12))
FensterMgr.py

#!/usr/bin/python
from tkinter import *
from cgitb import text
from _ast import Return
from sys import *
from math import *
# **********************************
# Erstellen und Managen des Fensters
# **********************************
#
     
def Printme(grd):
    print ("Hallo... PRINT meeee")
    x=acos(pi*grd/180)
    y=asin(pi*grd/180)
    print ("X = ", x)
    print ("Y = ", y)
    return(x)
pydevd_file_utils.py

# example:
PATHS_FROM_ECLIPSE_TO_PYTHON = [
     (r'C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop.py',
      r'/home/pi/raspiproj/Teleskop.py')
     ]
The program works as planned, but I cannot set a breakpoint.
But when I debug the programm I get three messages:

1.
Quote:warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/pi/pysrc/setup_cython.py" build_ext --inplace' to build.
2.
Quote:pydev debugger: unable to find translation for: "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\FensterMgr.py" in ["c:\users\kurt\workspace\remotesystemstempfiles\raspberrypi\home\pi\raspiproj\teleskop.py"] (please revise your path mappings).
3.
Quote:pydev debugger: warning: trying to add breakpoint to file that does not exist: C:/Users/Kurt/workspace/RemoteSystemsTempFiles/RASPBERRYPI/home/pi/raspiproj/FensterMgr.py (will have no effect)

Do you think I have to setup the path for the script FensterMgr.py in the file pydevd_file_utils.py
or somewhere else?
I would be glad if you or somebody else can help me!


With kind regards
Kurt
Reply
#6
If on Linux, you can set a symbolic link.
ln -s path/original.py local.py
Or perhaps specify the path using pathlib.
I know that you can also use relative paths in the import name.
I'm not an expert on this subject, but symbolic links work for me.
Reply
#7
Hi,
my Host where eclipse runs is a Windows PC and the Script runs on a raspberry.
Wehre should I set the link?
On the host or on raspberry?
Reply
#8
@Larz60+,
thank you very much for your tip. I created the symbolic link exactly as you suggested.
I wrote on my raspberry:
Quote:ln -s path/original.py local.py

Think Ist this correct or is this just an example Think ?
But it still doesn't catch the breakpoint.
I execited the script typing python3 Teleskop.py
I really have no ideas anymore. Confused
Has anybody an idea?
Thanks in advance.
Kurt
Reply
#9
Hello,
I'm trying to solve my problem by setting a symbolic link in the way as suggested by @Larz60+ :
Quote:ln -s /home/pi/raspiproj/Teleskop/FensterMgr.py "C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop\FensterMgr.py"
It creates a link.
Quote: C:\Users\Kurt\workspace\RemoteSystemsTempFiles\RASPBERRYPI\home\pi\raspiproj\Teleskop\FensterMgr.py -> /home/pi/raspiproj/Teleskop/FensterMgr.py
Every seems to be ok, but the pydev debugger is not able to add the breakpoints.
I'm not an expert in linux and I do not know whats wrong. Huh
Think What is the exact syntax for setting such type of link. Think

I was working on this and I found out that pydev is able to debug one script only. But if you use a program which calls functions located in other scripts it doesn't get the breakpoints there.
You have to setup the file /pydevd_file_utils.py again for this script if you wont to debug the function.


It's a little stupid but you have to live with that! Or is there an other way?

Thanks a lot for any tips
Kurt
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Debugger azizrasul 6 1,179 Nov-02-2022, 09:46 PM
Last Post: azizrasul
  Idle debugger pops up Run.py - library? fred1232 1 1,635 Jul-27-2021, 01:01 AM
Last Post: Larz60+
  VS Code debugger using wrong Python environment topfox 0 2,492 Jun-09-2021, 10:01 AM
Last Post: topfox
  Threading or pycharm pydev problem Fidgety 2 2,549 Apr-04-2021, 03:28 PM
Last Post: ndc85430
  Using Spyder Full Screen Debugger ErnestTBass 0 1,469 Aug-20-2020, 08:17 PM
Last Post: ErnestTBass
  Debugger Disabled erictan 1 3,970 Apr-30-2020, 02:17 PM
Last Post: pyzyx3qwerty
  pydev debugger: process 3442 is connecting when I run a program with ALT+COMMAND+R Seneca260 1 2,636 Jan-06-2020, 06:57 PM
Last Post: micseydel
  Warning / Error handling in python Prarthana_12 1 5,086 Feb-08-2019, 09:21 PM
Last Post: snippsat
  Python Debugger Suggestions nilamo 3 3,051 Oct-22-2018, 07:05 PM
Last Post: jdjeffers
  gdb breakpoint in python module Viesturs 0 2,205 Jul-27-2018, 02:02 PM
Last Post: Viesturs

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020