0

I have an API project in C# and Android app that accesses those API. Now I want to debug it in c# when ever an API method is called.

The problem is how to set IP of local host so I can access it through the URL on my android device and later set the URL in Android app and debug the methods.

RBK
  • 558
  • 5
  • 16
  • 2
    Possible duplicate of [Connecting to Visual Studio debugging IIS Express server over the lan](https://stackoverflow.com/questions/14725455/connecting-to-visual-studio-debugging-iis-express-server-over-the-lan) – Martheen May 09 '18 at 04:55
  • you can host your app on azure and your breakpoint can hit your local machine. check this https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure – Anirudha Gupta May 09 '18 at 07:07

1 Answers1

3

If I understand your question correctly, this is how i would solve it.

  1. Deploy the API code to your local IIS (eg. 192.168.0.1).
  2. Point your android to your API code on 192.168.0.1.
  3. Open Visual studio and attach the debugger to the running process.
Pieter Alberts
  • 829
  • 1
  • 7
  • 23
  • Above works, but I am looking for a shorter solution, to debug my API service and connect to it using Android app on android phone, phone connected to PC's wifi hostpot, where they detect each other. – Edgaras Feb 28 '20 at 14:32