-
Notifications
You must be signed in to change notification settings - Fork 137
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
Cannot debug any function locally, in VS Code #436
Comments
@AmanG2205 can you give us some more info on how you reproduced this error?
|
Same here with C# runtime, in vscode on macos 10.13.5. 1- yes, brand new with a blob trigger. the blob trigger works but never attach to the main method
3- always, can't attach default config files created using the azure extension. restarted vs code couple of times |
This is likely due to the same issue reported in version 2.0.1-beta.30 and 2.0.1-beta.31 of the functions cli here: Azure/azure-functions-core-tools#557 You can downgrade to version 2.0.1-beta.29 as a workaround, otherwise check out that issue for workarounds on the current version |
Actually I'm struggling to repro the problem on a Mac with v2.0.1-beta.31. @Jonathan34 can you copy the logs from when you F5? The stuff in the 'Terminal' window? |
Then the program executes the function for every blob in the blob storage folder. |
In fact, it's not that for why I opened up this issue in the first place.
Finally, after 60 seconds, I get a notification saying:
Additionally, I also get the unresolved dependencies notification. If I restore the unresolved dependencies, I get a warning saying that
The output says
This clearly states the problem, which is that it restores the Microsoft.AspNet.WebApi.Client 5.2.2 to .NETFramework rather than .NETStandard. Hence, the program won't work. IMHO, the restoration process messes up the entire program and this is a brand new, template based code. |
Note: the version 29 is not available via brew.... needs to be installed manually. |
@AmanG2205 the problem you noted about "Microsoft.AspNet.WebApi.Client 5.2.2" is a known issue, but shouldn't be a blocker. I can successfully debug even with that warning. Just to be sure, though, you can update the version of "Microsoft.NET.Sdk.Functions" to "1.0.14" in your csproj file and that warning should go away after you restore packages. I'm guessing @Jonathan34 My log looks exactly like yours and it's working. Can you try a clean project with just an HttpTrigger instead of a BlobTrigger? Does that work for you? |
Actually, I'd guess the problem is |
@EricJizbaMSFT tried a new http trigger and blob trigger with default settings. same result. (yes i triggered the http call and got I noticed:
then a popup:
i am using vscode Version 1.26.0-insider (1.26.0-insider 2018-07-10T05:05:14.117Z) I added |
Okay this may be my last idea. You can follow these steps to manually attach to the functions host:
If that works - we probably have a bug in our extension somewhere. If that still doesn't work, that means the bug is probably in the functions cli or there's some configuration problem on your machine. |
Hi, I had the same issue but after following up the instructions from @EricJizbaMSFT I noticed that the step 8. was failing with a 'no such file or directory' error. Then I remembered that I had changed the project to use netcoreapp2.1 instead of netstandard2.0 (default) and I verified that the task in the tasks.json file was executing a directory change to ${workspacefolder}/bin/debug/netstandard2.0, which does not exist in my case. After changing the directory to the correct one, all went well and I can debug :). At the end my tasks.json looked like this (removed the parts that are not relevant for simplicity): Hope this helps others with the similar issue. |
@EricJizbaMSFT painful but works. |
@Jonathan34 when you manually pick the process, does it look like this: And if you run
Our extension is trying to find the 'func' process automatically and I'm wondering if yours is different for some reason. |
Repro steps:
Action: azureFunctions.pickProcess
Error type: Error
Error Message: Failed to detect running Functions host within "60" seconds. You may want to adjust the "azureFunctions.pickProcessTimeout" setting.
Version: 0.9.1
OS: win32
The text was updated successfully, but these errors were encountered: