2

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">
bbaley
  • 199
  • 6
  • 22
  • What about F11? What does that do? – Mark C. Jan 22 '16 at 20:53
  • same result on Step Into (F11). – bbaley Jan 22 '16 at 21:02
  • The other odd thing is that when trying to set breakpoint on some other lines (to see if any different) I am getting messages about "breakpoint failed to bind" – bbaley Jan 22 '16 at 21:03
  • Hm. Possibly try to clean your solution and then rebuild? – Mark C. Jan 22 '16 at 21:04
  • ok - I found a solution here on Stackoverflow - related but only after I started getting the breakpoint binding errors: http://stackoverflow.com/questions/31732944/breakpoint-failed-to-bind-visual-studio-2015 - need to force build in DEBUG - it was in RELEASE – bbaley Jan 22 '16 at 21:10
  • Good! If you want to edit your question or post it as an answer, it would be great to help everyone else who may run into this. – Mark C. Jan 22 '16 at 21:11

1 Answers1

0

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

Community
  • 1
  • 1
bbaley
  • 199
  • 6
  • 22