I'm doing a project where Raspberry pi works headless and accesses Internet via wifi. I want to remotely access the rpi desktop from my laptop for programming. I'm not sure if it is possible using Ethernet cable because rpi would get a dynamic ip over wifi. What I want to achieve is connect rpi to internet via wifi and do the programming & debugging when ever necessary by plugging in a network cable and connecting it directly to my laptop or is it possible to do both through wifi? (I don't want to use a router and I don't have a static ip).
Otherwise is it possible to make rpi to get dynamic ip and access wifi and use the static ip automatically when wifi dongle is removed and network cable is plugged in for remote access?