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

Unable to load symbols for remote debugging #872

Open
grayjeremy opened this Issue Jul 4, 2018 · 13 comments

Comments

Projects
None yet
8 participants
@grayjeremy

grayjeremy commented Jul 4, 2018

Running the newest version of VS 2017 15.7.4 and the newest "Azure Functions and Web Jobs Tools" version 15.0.40617.0

Created a functions v2.0 (preview) azure function project and added a new function with an event grid trigger.

Successfully debugged locally, then Web Deployed to an App Service (confirmed pdb's are on app service), and registered the event grid event. I am able to see event output from the "View Streaming Logs" function within the portal AND in visual studio by right-clicking on the app service in the Server Explorer -> Azure window.

When I click on "Attach debugger" (Server Explorer -> Azure -> App Service -> Function App Service)

image

Everything connects successfully and all my non-project symbols for dependencies are loaded. I have "Just my Code" disabled and have tried toggling "Enable Source Server Support" as well as "require source files to exactly match their original version" unchecked with no luck.

All my non-project symbols load, however the local ones don't and I can't match my local source code to what is running on the remote.

image

Did something break in 15.7.4 here?

@safihamid

This comment has been minimized.

safihamid commented Jul 5, 2018

@grayjeremy nothing has changed for 15.7.4 and I just tested mine and everything works just fine. can u try again or create a new function app and let us know what exactly is not working for u?

Thanks
Hamid

@TobiasMalm

This comment has been minimized.

TobiasMalm commented Jul 9, 2018

I have the exact same problem. I created a new project and function app i azure. The problem remains.

@safihamid

This comment has been minimized.

safihamid commented Jul 10, 2018

We have identified an issue that causes the function app to scale out to two instances when debugging is enabled in consumption plan. and when hitting the url of an http trigger function in that function app you could be sent to the other instance than the one VS is attached to and hence your breakpoints might not be hit.

The fix is checked in and we will deploy it in the next few weeks. but as a general rule when debugging functions in consumption mode, you will need to use tools like Fiddler or Curl to make sure only one concurrent request is sent to the function app to avoid scaling out as VS can only attach to one instance at a given time.

@grayjeremy

This comment has been minimized.

grayjeremy commented Jul 11, 2018

This makes sense if the bug you found caused the .pdb's not to be deployed to the new instance(s). If the .pdb's replicated it seems like the symbols would load but the breakpoint wouldn't be hit on every request.

@safihamid

This comment has been minimized.

safihamid commented Jul 11, 2018

@grayjeremy again the issue is not with symbols. pdbs as well as all site contents are always shared across all instances. The issue is VS connects to one instance and request ends up in another instance.

@grayjeremy

This comment has been minimized.

grayjeremy commented Jul 11, 2018

I agree that the issue you found was not with the symbols, however, my issue was symbols not loading...not that everything loaded correctly and the server I was attached to didn't get a request. Either way, I'll retest when the patch goes out. Thanks for all your effort on this.

@safihamid

This comment has been minimized.

safihamid commented Jul 11, 2018

One workaround for the time being is to set this app setting for your function app in consumption plan:
WEBSITE_HTTPSCALEV2_ENABLED = 0

This will cause the function app to not scale so aggressively and stay on one instance during debugging for dev/test scenarios.

@CoenraadS

This comment has been minimized.

CoenraadS commented Jul 26, 2018

My functions run on Service Plan. I had 2 instances, setting it to 1 instance also fixed my problem.

@konradsikorski

This comment has been minimized.

konradsikorski commented Oct 11, 2018

I have exactly the same issue. I have just created new azure function v2.0 from VS template. Pulished to new Azure Web Site. The App Service use B1 service plan, this plan support only manual scale. In Scale out options I have set 1 (ONE) instance. The function is deployed in debug mode and the pdb file exists on the server. After attaching from VS I am receiving exactly the same error 'no symbols loaded' any solution?

And my VS is 2017 15.8.6, azure function tools 15.9

@rohittidke

This comment has been minimized.

rohittidke commented Oct 24, 2018

Any solution yet? I am having the same issue.

@safihamid

This comment has been minimized.

safihamid commented Oct 24, 2018

This is fixed by now. if you still hit this issue, make sure in Debug code types, 'Managed (CoreCLR)' is selected.
image

@simondel

This comment has been minimized.

simondel commented Oct 25, 2018

Unfortunately I'm not yet able to debug the code. I've set the application setting and also the 'debug these code types' setting.

@CasperWSchmidt

This comment has been minimized.

CasperWSchmidt commented Nov 6, 2018

This is fixed by now. if you still hit this issue, make sure in Debug code types, 'Managed (CoreCLR)' is selected.
image

This work-around worked for me. But why does it not recognize this automatically?

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