简体   繁体   中英

VS2012 debugger doesn't stop in specific class

The problem I have is that my debugger doesn't enter my class Station when I create it in the mainwindow but he executes the class. I placed a breakpoint on InitializeComponent(); I hit F11 then the debugger highlights the Station statie = new Station(); F11 it highlights the next bracket. At this point I hover my mouse over statie and see the code has been executed it is not null.But when I edit my class with more code I wish to debug the class my debugger doens't go in the class even if I place a breakpoint in my class station.

I searched some debugger options to see if there are right but nothing really helps.(Tools -> options -> debugging -> general)

namespace NMBSLiveBoard
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Station statie = new Station();
        }
    }
}

That is normal. The Station constructor is a default one meaning there is nothing to go into.

If you need to see debugging info of a method or some property you should assign it or call it (for a method).

All information about the object you just created should be available if you place your mouse over the newly created Station variable.

i forgot to make an instace of my class in my xaml. this fixed my problem when i used a constructor in my class i had an infinte loop

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM