问题描述:

I recently started working on a C# ASP.NET solution built in VS2012 Pro in VS2015 Community edition.

When I am debugging the app in VS2012, all is fine.

However, when I have a breakpoint set in the C# code and step-over in the VS2015 IDE, it always plops me straight into the Site.Master .apsx code, and I cannot step through the code behind where I have the breakpoint set ?

I am sure there is probably a debug setting I am missing or forgetting but can't figure it out yet.

Does anyone have any ideas ?

Thanks for any input.

some details.

The breakpoint stops where expected, in the C# code behind like so;

private int ImportProjects(string _importFilename, oCompany selectedCompany) {

int rec_count = 0;

<breakpoint here> string fname = _importFilename;

...

When I Step Over (F10) it opens up Site.Master aspx code (not .cs)

and steps to the following lines in the aspx code:

[steps to here] <title><%: Page.Title %> CPP Portal</title> 5207ms elpased

<asp:PlaceHolder ID="PlaceHolder1" runat="server">

[steps to here] <%: Scripts.Render("~/bundles/modernizr") %> 525ms elapsed

<footer>

<div class="content-wrapper">

<div class="float-left">

[steps to here] <p>&copy; <%: DateTime.Now.Year %> CPP Tools</p>

the initial breakpoint is in a function called from an onclick event

in the web.config I have

<compilation debug="true" targetFramework="4.5">

网友答案:

I found a solution here on Stackoverflow - after I started getting the breakpoint binding errors: Breakpoint Failed to Bind - Visual Studio 2015

THe Solution was in RELEASE when I started working on it in the new VS2015 IDE - need to force build in DEBUG

相关阅读:
Top