Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to debug Azure Fuctions in Visual Studio #110

Closed
iamsunny opened this issue Dec 17, 2016 · 31 comments
Closed

Not able to debug Azure Fuctions in Visual Studio #110

iamsunny opened this issue Dec 17, 2016 · 31 comments

Comments

@iamsunny
Copy link


VS Version: Visual Studio Enterprise 2015
14.0.25431.01 Update 3

OS Version: Windows 8.1 Enterprise / 6.3.9600 Build 9600


Steps to Reproduce the issue:

Download Microsoft Azure App Service Tools for Visual Studio from the link below:
https://aka.ms/azfunctiontools

Install Microsoft Azure App Service Tools for Visual Studio
(Quit Visual Studio if running already. Or, it will ask you to quit.)

Start Visual Studio

New Project --> Cloud --> Azure Functions (preview)

Give a name to the project --> Create

New Project is created with no function

Right click on Project in Solution Explorer
-> Select "New Azure Function"
-> Select your flavor of language and template.
-> give it a name and hit Create

Function template is added.

Now hit F5 or Click "Start Debugging" under debug menu.

Popup comes - The Azure Function CLI tools are required to run this project. Would you like to download and install them now?

Another popup comes -
The debug profile "{ProjectName}" is missing the path to the executable to debug.

and the debug stops.

@lindydonna
Copy link
Contributor

lindydonna commented Dec 19, 2016

Did you successfully install the Azure Functions CLI tools? You can check by going to the folder %USERPROFILE%\AppData\Local\Azure.Functions.Cli

If not, restart VS and do F5 again. You should get a prompt to install the tools.

@iamsunny
Copy link
Author

I tried it several times. The prompt comes up every time I restart VS. It runs for a minute long and then the error message shows up.
I also tried reinstalling Azure-Function-CLI multiple times. With and Without Admin privilege both. It is working properly on command prompt.

@BaskarGovindaswamy
Copy link

Hi,
i also face the same issue, Could you please give me the solution, Even i tried this through node.js command prompt ---> "npm i -g azure-functions-cli". But still didnt work for me,

@iamsunny
Copy link
Author

@lindydonna hi Donna. Any update on this bug?

@BaskarGovindaswamy
Copy link

Hi Team,
it works now, it was network issue - In my organization internally they are blocking. when i reached home and tried with my Airtel dongle network connection and it was installed and i am able to debug the azure function.

But, the error message is not a valid one. Please provide a valid message.

Thanks
Baskar.G

@svdoever
Copy link

I'm having the same issue, on two different machines.

@lindydonna
Copy link
Contributor

@svdoever It sounds like the download of the CLI tools didn't complete. Do you see them installed in %USERPROFILE%\AppData\Local\Azure.Functions.Cli?

@lindydonna
Copy link
Contributor

@iamsunny It sounds like the tools didn't download. Do you see anything in %USERPROFILE%\AppData\Local\Azure.Functions.Cli?

@lindydonna
Copy link
Contributor

If you have problems downloading the tools through Visual Studio, you can unzip manually, just put it in the folder %USERPROFILE%\AppData\Local\Azure.Functions.Cli\1.0.0-beta.9.

You can download the beta 9 CLI drop from here: https://functionsbay.blob.core.windows.net/public/1.0.0.beta.9/Azure.Functions.Cli.zip

@iamsunny
Copy link
Author

@lindydonna thanks for replying. I tried extracting latest beta in mentioned folder and it worked this time.
Thumbs Up!

@iamsunny
Copy link
Author

@svdoever & @BaskarGovindaswamy : Please try the latest beta if still not resolved.

@waqar-haider-confiz
Copy link

waqar-haider-confiz commented Jan 18, 2017

I am facing the same issue on Windows 10 and have tried above solution.
In my case, I can't see folder 'Azure.Functions.Cli' under '%USERPROFILE%\AppData\Local' path.
I downloaded the zip and put at the path. But problem still persists.

I followed the link for installation: https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/

I have Azure 2.9.6 .NET SDK and Visual Studio Tools for Azure Functions installed at local.

@iamsunny
Copy link
Author

@waqar-haider-confiz did you try the latest beta:
https://functionsbay.blob.core.windows.net/public/1.0.0.beta.9/Azure.Functions.Cli.zip

You can try creating a folder there in case you don't find it.

@waqar-haider-confiz
Copy link

I have tried it but not working for me.

@lindydonna
Copy link
Contributor

@waqar-haider-confiz Can you be more specific about your scenario and the workaround you tried?

@waqar-haider-confiz
Copy link

Hey @lindydonna,

I am using Windows 10.
I want to start development of Azure Functions at local on my Visual Studio Enterprise 2015. For setup/installation, I followed this link .
As mentioned in above tutorial link, I have Azure 2.9.6 .NET SDK and Visual Studio Tools for Azure Functions installed at local.

After installation of above components, I was able to create a project for Azure Functions in Visual Studio. I added new azure function in the project and executed it by pressing F5.

Then,
{
Popup comes -
The Azure Function CLI tools are required to run this project. Would you like to download and install them now?

Pressed 'Yes' button

Another popup comes -
The debug profile "{ProjectName}" is missing the path to the executable to debug.

and the debug stops.
}

I looked for folder 'Azure.Functions.Cli' at the path '%USERPROFILE%\AppData\Local' , but it was not there.
As mentioned in your comment, to download Azure.Functions.Cli from that blob link. I downloaded and put the extracted folder named 'Azure.Functions.Cli' at the path '%USERPROFILE%\AppData\Local'. After that, I restarted the Visual Studio and hit the F5.

Now,
{
Popup comes -
The newer version (1.0.0-beta.9) of the Azure Functions CLI tools is available. Would you like to download and install them now?

If I hit "No", Debugging stops.
If I hit "Yes",

Another popup comes -
Downloading version 1.0.0-beta.9 of the Azure Functions CLI tools. This may take a few minutes...

After few minutes,

Another popup comes -
The debug profile "{ProjectName}" is missing the path to the executable to debug.

and the debug stops.
}

@svdoever
Copy link

svdoever commented Jan 19, 2017 via email

@lindydonna
Copy link
Contributor

Reopening the issue.

@svdoever and @waqar-haider-confiz: can you provide the exact directory structure in your %USERPROFILE% folder? I wonder if the problem is that you're off-by-one the layout.

@lindydonna lindydonna reopened this Jan 19, 2017
@waqar-haider-confiz
Copy link

Yeah sure, when I navigate to %USERPROFILE%, I see following files/directories.

  • AppData
  • Contacts
  • Desktop
  • Documents
  • Downloads
  • Favorites
  • Links
  • Music
  • cont.

Inside AppData directory, following files/directories are there

  • Local
  • LocalLow
  • Roaming

@lindydonna
Copy link
Contributor

@waqar-haider-confiz I should have been more specific. This is where my func.exe lives: C:\Users\donnam\AppData\Local\Azure.Functions.Cli\1.0.0-beta.9\Func.exe. Does your folder structure match that?

@waqar-haider-confiz
Copy link

@lindydonna ,
The directory '1.0.0-beta.9' does not exist under '\AppData\Local\Azure.Functions.Cli' path.

I downloaded from the link you shared, it also does not contain the directory "1.0.0-beta.9". Pasting down the link from where I downloaded and put under my "Local" folder "https://functionsbay.blob.core.windows.net/public/1.0.0.beta.9/Azure.Functions.Cli.zip"

@lindydonna
Copy link
Contributor

@waqar-haider-confiz Yes, you need to manually create the folder 1.0.0-beta.9 and unzip the contents of Azure.Functions.Cli.zip as I mentioned in my earlier comment: #110 (comment)

@DamianFlynn
Copy link

I have also the same issues as reported in this thread - in AppData there is no folder for Azure.Functions.Cli, despite multiple times VS attempting to download and install. My guess is a timeout, as downloading the 26Mb package takes about 10 minutes on my internet connection. (No Joking - 6Mb pipe)

I have used NPM to get the current verision of the CLI, which has a lot of important fixes -
Azure Functions Cli (1.0.0-beta.91)
Function Runtime Version: 1.0.10726.0

The zip linked above is for the older, build of *1.0.0-beta.9; *
I figured out that a tiny tweak would yield beta91
'https://functionsbay.blob.core.windows.net/public/1.0.0.beta.91/Azure.Functions.Cli.zip'

Once placed debugging is working.

@lindydonna
Copy link
Contributor

@DamianFlynn I wonder if we need to mirror the package on a CDN--right now it's in blob storage in West US. If you don't mind sharing, where are you located geographically?

@gabomgp
Copy link

gabomgp commented Feb 14, 2017

@lindydonna I'm in the same problem. When i'm trying to debug my Azure Funtion, a dialog with the message "Downloading version 1.0.0-beta.91 of the Azure CLI tools." and don't install anything. The numer 91 in version "1.0.0-beta.91" is extrange, is it ok?

@lindydonna
Copy link
Contributor

@gabomgp That is correct, we went from .9 to .91 because Visual Studio uses SemVer 1.0, which does a string comparison of everything after "beta". You can download the file from here: https://functionsbay.blob.core.windows.net/public/1.0.0.beta.91/Azure.Functions.Cli.zip

@lindydonna
Copy link
Contributor

@gabomgp @DamianFlynn @waqar-haider-confiz @svdoever: we've just switched over the URL that Visual Studio downloads from to use a download that is hosted on an Azure CDN. This will automatically geo-replicate, so folks should see much improved download performance.

@lindydonna
Copy link
Contributor

Closing this issue, as it appears to be network problem downloading the CLI.

@priteshtechark
Copy link

Run VS 2017 as an Administrator works for me.

@Mike-E-angelo
Copy link

The zip provided above no longer exists... can someone please provide the latest?

@SurajRevankar
Copy link

SurajRevankar commented Apr 5, 2018

Download & install node.js from https://nodejs.org/en/ and run the the below npm script (given under To install) in Node.Js Command Prompt.
Select the Corresponding runtime :

Windows

Both v1 and v2 of the runtime can be installed on Windows.
To install v1:

npm i -g azure-functions-core-tools
To install v2:

npm i -g azure-functions-core-tools@core --unsafe-perm true

Once installed test by running a command as func in your command prompt, you should see the Azure function app icon with relevant information.

Now go to VS2017 function App, run the app, it prompts to install Azure-Function CLI, select yes, it will install without any errors this time. Then you can start debugging the Azure-function App.

Happy coding!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants