If you created a v2 function, please check your function CLI output when debugging locally. At the third line, there should be Now listening on: http://0.0.0.0:7071
If you see Now listening on: http://localhost:7071
, it means your function CLI is old so that it still binds to localhost, which stop you accessing function with your local IP.
Apparently solution is to use the latest CLI. On VS menus, Tools->Extensions and Updates, find Azure Functions and Web Jobs Tools
, update it to latest version(15.0.40617.0). Then things should work with new CLI.
Note that local functions can only be visited by systems in the same LAN, otherwise you should make the function available in public, have a look at ngrok. And if you use v1 function, its latest CLI still binds to localhost, have to resort to tools like ngrok if needed.