You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
remote debugging - remote server is different OS from local server #948
run debug from windows to remote linux
When the local module (windows), in my case "netifaces", has different characteristics from remote module (linux) we get error reading the network interface caracteristics. Why? It should run remote code and not local code.
Regards
Does this issue occur when all extensions are disabled?: Yes/No
# ##################################### #### R E M O T E - Linux OS ############## ##################################### ******** D E B U G *********************************importptvsdptvsd.enable_attach("my_secret", address=('localhost', 3000))
ptvsd.wait_for_attach() # only in the remote node# ******** D E B U G *********************************importsys; sys.dont_write_bytecode=TrueimportSourceasPrjmyLibName= ['LnPyLib', 'DDNS_v2018-02-27.zip']
LnLib=Prj.SPE.LibPath(myLibName, fDEBUG=False)
# ##################################### #### L O C A L Windows OS ############# ##################################### ******** D E B U G *********************************importptvsdptvsd.enable_attach("my_secret", address=('localhost', 3000))
# ptvsd.wait_for_attach() # only in the remote node# ******** D E B U G *********************************importsys; sys.dont_write_bytecode=TrueimportSourceasPrjmyLibName= ['LnPyLib', 'DDNS_v2018-02-27.zip'] **_<===BreakPoint_**LnLib=Prj.SPE.LibPath(myLibName, fDEBUG=False)
Problem
When I start the debugger I can STEP just the first two line and the I get an error regarding a missing feature of netifaces module (AF_PACKET).
File "y:\GIT-REPO\Python3\DDNS\__main__.py", line 79, in <module>
Prj.Main(gv.args.firstPosParameter)
File "y:\GIT-REPO\Python3\DDNS\Source\Main\DDNS_Main.py", line 83, in Main
interfaces = Ln.getInterfaces(dictType=Ln.Dict)
File "y:\GIT-REPO\Python3\DDNS\LnPyLib\Net\InterfacesCl.py", line 418, in getInterfaces
ifc = Interfaces(ifcName)
File "y:\GIT-REPO\Python3\DDNS\LnPyLib\Net\InterfacesCl.py", line 116, in __init__
self.arpPing(self._gatewayIpAddress)
File "y:\GIT-REPO\Python3\DDNS\LnPyLib\Net\InterfacesCl.py", line 319, in arpPing
macAddressHex = bytes.fromhex(self._MAC_address.replace(':',''))
AttributeError: 'NoneType' object has no attribute 'replace'
But this feature is missed just in windows module and not in linux one.
In any case:
I realized I had omitted something important. I didn't select the configuration type to be used for debugging. I left the default. Selecting the right configuration it works fine and very fast.
I am very sorry to have bothered You for my mistake.
Thanks for Your support and best compliments for this product that I'm starting to discover.
It's OK for me. Problem is solved.
Regards
Loreto
Activity
weinand commentedon Mar 5, 2018
From VSCode Bot (@vscodebot)[bot] on March 2, 2018 15:47
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
weinand commentedon Mar 5, 2018
From Isidor Nikolic (@isidorn) on March 2, 2018 15:56
Sounds like a potential duplicate of the wsl issues, forwarding to Andre Weinand (@weinand)
weinand commentedon Mar 5, 2018
Loreton How does your launch config look like?
weinand commentedon Mar 5, 2018
From Loreton on March 5, 2018 11:4
my main.py code
Problem
When I start the debugger I can STEP just the first two line and the I get an error regarding a missing feature of netifaces module (AF_PACKET).
But this feature is missed just in windows module and not in linux one.
In any case:
launch extract configuration
Kind Regards
DonJayamanne commentedon Mar 5, 2018
lorento
Please could you change the remote python file being debugged as follows:
my main.py code
print("something entered")and the line after as wellAttach (Remote Debug)and run that.Note: None of the
Pythoncode gets executed locally on your windows machine.Loreton commentedon Mar 6, 2018
Hi Don,
reading your last update, when you said:
I realized I had omitted something important. I didn't select the configuration type to be used for debugging. I left the default. Selecting the right configuration it works fine and very fast.
I am very sorry to have bothered You for my mistake.
Thanks for Your support and best compliments for this product that I'm starting to discover.
It's OK for me. Problem is solved.
Regards
Loreto
Update interpreter display (#3)