Локальный отладчик windows visual studio не работает

Я только что сделал новый проект Console Aplication в Visual Studio C ++. Я изменил настройки, чтобы увидеть консоль при компиляции&запустить (CTRL + F5). Однако, когда дело доходит до запуска в режиме отладки (F5), программа заканчивается, даже если у меня есть точки останова в нескольких местах. Красные круги становятся белыми и имеют восклицательный знак в …

На чтение 10 мин Просмотров 5.1к. Опубликовано 31.07.2020

Содержание

  1. Решение
  2. Другие решения
  3. 29 ответов
  4. Хабр Q&A — вопросы и ответы для IT-специалистов

Я только что сделал новый проект Console Aplication в Visual Studio C ++. Я изменил настройки, чтобы увидеть консоль при компиляции&запустить (CTRL + F5).
Однако, когда дело доходит до запуска в режиме отладки (F5), программа заканчивается, даже если у меня есть точки останова в нескольких местах.
Красные круги становятся белыми и имеют восклицательный знак в течение этих 2 секунд, пока он пытается отладить.
Кто-нибудь знает, как это исправить?

Решение

(1) Убедитесь, что ваше приложение находится в режиме отладки (не в режиме выпуска).

(2) Пожалуйста, включите параметры, такие как следующий снимок экрана.

Другие решения

Есть несколько вещей, которые вы можете проверить.

Прежде всего убедитесь, что код, в котором установлена ​​точка останова, достижим. Поместите его в точку входа вашего приложения.

Есть вероятность, что символы отладки где-то перепутались. Следовательно, попробуйте очистить / перестроить проект (вы можете попробовать удалить каталог bin / build вручную).

В Build-> Configuration Manager вы также можете проверить, действительно ли «Отладка» для конфигурации решения заставляет ваш проект выполняться в режиме отладки.

94 Saint [2012-02-21 11:49:00]

Когда я нахожу F5 (режим отладки), ничего не происходит. Строение работает правильно, exe файл, который я могу запустить правильно, но не могу запустить debug. Почему?

debugging c# build visual-studio-2010 .net-2.0

29 ответов

У меня была та же проблема, и все трюки не сделали этого, пока я не снял флажок «Включить хостинг Visual Studio» на вкладке отладки в свойствах проекта

45 mo. [2012-09-25 21:18:00]

Тьфу! Я испытывал те же самые симптомы, что и вы, и после того, как вы пробовали все предложения, единственным, кто работал, был ваш собственный: создание нового проекта и копирование всего содержимого.

Затем я заметил, что я не могу вручную удалить свой каталог Bin, и я понял, что MyApp.vshost.exe все время работал в фоновом режиме, не позволяя себе перезаписывать Visual Studio 2012. Не знаю, как это сделать все еще работал с VS2010:/

В итоге, решение, которое сработало для меня: Убейте процесс, повторите попытку.

Другими словами, вы пытались отключить и снова включить?

Перезагрузите VS и попробуйте отладить. Некоторое время это случается, даже у меня также была та же проблема.

Извините, что поставил старый вопрос, но сегодня у меня была такая же проблема, но причина была в том, что из-за порядка сборки решения. Если вы перейдете в Solution Property Pages → Common Properties → Startup Project .
Выбрано Multiple startup projects , переместите веб-проект в начало списка.

В моем решении для веб-приложений у меня есть 2 веб-проекта и 5 проектов кода, один из моих проектов кода был наверху, и поэтому отладка не запускалась.

Надеемся, что другие найдут это полезным

5 Neil [2016-03-14 14:10:00]

Это решение уже было упомянуто, но для его работы потребовалось некоторое вмешательство, поэтому ясное решение

На вкладке «Проект/вкладка» выберите «Свойства». (или в вашем браузере решений) Перейдите на вкладку «Отладка». Снимите флажок Включить процесс хостинга Visual Studio. (Снимите флажок) проверьте, работает ли он. если он не перезагружает ваш компьютер (некоторые из файлов проектов работают в фоновом режиме, если вы знаете, как их остановить, перезапуск не обязательно просто заканчивает их задачи) перестроить проект

это должно решить проблему

Что помогло мне решить эту проблему:

  • закрыть решение
  • удалить файл solution.suo
  • повторно открыть решение

Перед тем, как пройти интенсивное исправление. попробуйте это!

Просто запустите файл .exe в папке отладки. «Не закрывай!»

Запустите отладчик в Visual Studio. (i) Должна появиться ошибка. просто скажите «нет»

Закройте файл «.exe», который вы начали на этапе «1».

По какой-то причине визуальная студия застряла в этом приложении, которое я строю, но это сработало для меня.

Во-первых, в свойствах проекта и на вкладке Debug убедитесь, что ваш Start Action установлен на Start Project , а не какой-либо другой параметр, который не будет работать. Если это не разрешило, то:

Перейдите к Tools -> Options -> Environment -> Keyboard и в Show commands containing: введите Debug.Start и убедитесь, что для параметра Shortcuts for selected command: установлено значение F5 (Global) . Также убедитесь, что у вас нет ничего другого, сопоставленного с F5, который может конфликтовать.

Наконец, если это не решит вашу проблему, я предлагаю вам экспортировать текущие настройки среды в качестве резервной копии, а затем reset все настройки среды полностью. Посмотрите, разрешит ли это, если нет, а затем reimport ваши старые настройки и попробуйте восстановить визуальную студию.

закройте проект и удалите все файлы в папке projectinDebug , чтобы создать новое решение для отладки

1 joa [2013-04-23 23:19:00]

Перейдите в Обозреватель решений, щелкните правой кнопкой мыши проект, перейдите в свойства, нажмите «Отладка», внизу снимок установлен, установите флажок «Включить отладку SQL Server».

1 jmurphy [2013-05-22 20:10:00]

Убедитесь, что на вкладке «Проект» → «Свойства» → «Отладка» → «Начало действия», которые «Не запускать, но отлаживать мой код при запуске», не проверяется. Как-то это прошло через месяц после того, как я создал и работал над моим проектом.

Отметив это, я решил проблему.

У меня была такая же проблема с моим настольным приложением, и как этот форум говорит, что вы должны пометить свой проект как проект запуска, поскольку визуальная студия без опознавательных знаков.

Это сработало для меня отлично, и я считаю, что это поможет другим людям, которые могут иметь эту проблему.

0 Aidal [2016-10-13 13:35:00]

У меня была такая же проблема (видимо, несколько лет спустя), где я мог видеть свое устройство в VS 2015, но когда я хотел отлаживать устройство, ничего не происходило.

Это может быть другой вопрос, чем тот, который был у оригинального плаката, но это решение устранило проблему для меня в VS 2015.

Щелкните правой кнопкой мыши решение и выберите «Свойства», а затем отметьте, установлен ли флажок для вашего решения в столбце «Развернуть», если это не так, проверьте его и повторите попытку отладки. Работал для меня.

У меня была эта проблема в приложении WPF, над которым я работал. При запуске отладчика процесс с именем MyApp.VsHost.exe запускается и продолжает работать в фоновом режиме, но исключений не было бы выбрано и ничего в окне вывода, кроме информации о сборке.

Это произошло потому, что я изменил пространство имен моего класса App , но не обновил атрибут Class в App.xaml , чтобы соответствовать новому пространству имен. Я изменил пространство имен в файле xaml, и он снова работал.

Быстрое исправление, которое может помочь кому-то:

Я использую VS2013, и мой отладчик внезапно перестает работать. Я продолжал получать окно с сообщением о том, что отладка не поддерживается.

Наконец, я установил его с помощью флажка очистки NATIVE в разделе «Отладчики» на вкладке «Свойства страницы- > » Пуск «для запуска проекта. Теперь у меня только ASP.NET, выбранный под Debuggers.

Если вы работаете с пакетом SSIS или с решением с несколькими приложениями внутри него. Удостоверьтесь, что у вас есть правильный набор приложений в качестве «Начального проекта».

Если у вас есть отдельный проект приложения или SSIS в той же папке, ваша Visual Studio, вероятно, создает это вместо того, что вы хотите запустить.

Надеюсь, это поможет!

У меня была такая же проблема, и, глядя на ответ брзлвеловера, я нашел следующую проблему, которая, казалось, работала для меня. Проводя это, если кто-то другой имеет такую ​​же проблему, они также могут проверить это.

0 Annye [2015-02-19 15:30:00]

Я нашел решение:

  • Закройте решение для Visual Studio
  • Откройте заголовок проекта .csproj с помощью блокнота ++, например.
  • Поиск тегов в разделе
  • Удалить тег конфигурации полностью
  • Откройте свое решение, и для меня теперь отладка работает над моим проектом.

0 GlennG [2013-06-03 02:07:00]

Этот процесс обычно работает для меня:

  • Закрыть IE
  • Используйте диспетчер задач, чтобы проверить, что все экземпляры iexplore.exe ушли — kill любые оставшиеся «сироты».
  • Запустите IE из меню «Пуск» и убедитесь, что он запущен правильно.
  • Очистить кеш-кеш Internet Explorer и файлы cookie и перезапустить.
  • Закройте Visual Studio, чтобы освободить все блокировки.
  • IISReset
  • Перезапустить VS
  • Очистить проект/решение
  • Перекомпилируйте и он должен работать

0 toregua [2013-01-23 15:39:00]

Я нашел решение:

  • Закройте решение для Visual Studio
  • Откройте заголовок проекта .csproj с помощью блокнота ++, например.
  • Найдите false в разделе
  • Измените значение на true: true
  • Сохранить
  • Откройте свое решение, и для меня теперь отладка работает над моим проектом.
  • У меня такая же проблема. Я не смог отобразить окно отладки, но мне удалось перенаправить вывод отладки в упрощенное «ближайшее окно», проверив соответствующую опцию в Debug- > Options and Settings; только показывает явные отладочные записи в коде типа Debug.Writeline().

    Visual Studio 2010

    Для нового приложения ASP.Net Core 1.

    В консоли управления пакетами я запустил

    и мое решение могло бы скомпилироваться.

    Такая же ошибка, попробовал выполнить VS как Администратор, и он сработал.

    Я столкнулся с этой проблемой. В моем случае, как-то пропустили проект проекта запуска. Поэтому убедитесь, что один из проектов в вашем решении explorer задан как проект запуска. Чтобы настроить проект запуска, щелкните правой кнопкой мыши по желаемому проекту в проводнике решений → нажмите » Установить как проект запуска«

    Мой опыт работы с Visual Studio 2015, я попробовал удалить все процессы и перезапустить, это не сработало. Я попытался удалить каталог bin, это не сработало.

    К сожалению, единственное, что сработало, — это закрыть и перезапустить Visual Studio 2015 в режиме администратора. Вздох.

    Проверьте Configuration Manager, убедитесь, что все проекты компилируются для одной и той же платформы.

    Что касается проблемы выше, где консоль не отображается. (У меня недостаточно очков для комментариев, чтобы прокомментировать это сообщение.)

    Я отключил процесс хостинга, чтобы обойти проблему его оставления и оставить файлы заблокированными. Когда я это сделал, я обнаружил, что окно консоли не появилось, когда я ударил F5 для отладки, хотя моя программа прошла нормально. Затем я заметил, что у меня установлен флажок «Предпочтительный 32-разрядный». Я отмахивался от этого, перестроил и окно консоли появилось еще раз. Это показалось странным, поэтому я снова отметил его и подтвердил, что могу воспроизвести это поведение. Я использую Visual Studio 2013.

    -1 Saint [2012-02-21 12:36:00]

    Наконец я создал другой проект и скопировал существующие файлы и папки. Может быть, «непрофессиональный», но он работает:) К счастью, это небольшой проект

    У меня очень смешное решение, но это сработало для меня,

    Удерживайте клавишу F5, пока не увидите, что отладка началась, я серьезный парень.

    Сообщество, где люди делятся уникальным опытом

    Вопросы и ответы по любой теме от IT сообщества

    Помогаем строить карьеру в IT-индустрии

    Биржа удаленной работы для IT-специалистов

    Хабр Q&A — вопросы и ответы для IT-специалистов

    Получайте ответы на вопросы по любой теме из области IT от специалистов в этой теме.

    Over the weekend it seems like a number of updates have been applied to my team’s company computers and we are now unable to launch the x64 local debugger in Visual Studio 2013 Update 4 (Premium and Ultimate).

    Here is the error message that is shown:

    Visual Studio 2013 Debugger Error

    It reads:

    The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE)
    does not appear to be running on the remote computer….

    The error message talks about Remote Debugging, but we are not attempting to remote debug. The same message is shown when we attempt to attach to a local 64-bit process.

    The same error is seen for a brand new x64 project.

    asked Apr 20, 2015 at 4:26

    satnhak's user avatar

    2

    Whether it’s local or remote, x64 debugging in VS uses the remote debugging monitor, just like the error message says. If it worked and now it’s not working, any of the following could have happened:

    • you no longer have the required permissions to debug processes.
    • your VS (or MSVSMON) installation has been corrupted
    • your connection to the service is now being rejected by your firewall settings (you can see this one in the related questions tab to the side)

    Bottom line is, work on fixing the connection to the debugging server started by MSVSMON, you are indeed using it.

    answered Apr 20, 2015 at 4:38

    Blindy's user avatar

    BlindyBlindy

    63.5k10 gold badges88 silver badges128 bronze badges

    3

    May I know which msvsmon.exe that you trying to run?

    For my case I need to use msvsmon.exe from this location:
    C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDERemote Debuggerx64

    whereby this location:
    C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDERemote Debugger
    will throw the error message as yours.

    You need to make sure the permissions for your account is allowed by adding your windows account to the running msvsmon application (from Tools->Permissions menu)

    answered Jun 26, 2015 at 4:04

    mithocondria's user avatar

    Over the weekend it seems like a number of updates have been applied to my team’s company computers and we are now unable to launch the x64 local debugger in Visual Studio 2013 Update 4 (Premium and Ultimate).

    Here is the error message that is shown:

    Visual Studio 2013 Debugger Error

    It reads:

    The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE)
    does not appear to be running on the remote computer….

    The error message talks about Remote Debugging, but we are not attempting to remote debug. The same message is shown when we attempt to attach to a local 64-bit process.

    The same error is seen for a brand new x64 project.

    asked Apr 20, 2015 at 4:26

    satnhak's user avatar

    2

    Whether it’s local or remote, x64 debugging in VS uses the remote debugging monitor, just like the error message says. If it worked and now it’s not working, any of the following could have happened:

    • you no longer have the required permissions to debug processes.
    • your VS (or MSVSMON) installation has been corrupted
    • your connection to the service is now being rejected by your firewall settings (you can see this one in the related questions tab to the side)

    Bottom line is, work on fixing the connection to the debugging server started by MSVSMON, you are indeed using it.

    answered Apr 20, 2015 at 4:38

    Blindy's user avatar

    BlindyBlindy

    63.5k10 gold badges88 silver badges128 bronze badges

    3

    May I know which msvsmon.exe that you trying to run?

    For my case I need to use msvsmon.exe from this location:
    C:Program Files (x86)Microsoft Visual Studio 12.0Common7IDERemote Debuggerx64

    whereby this location:
    C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDERemote Debugger
    will throw the error message as yours.

    You need to make sure the permissions for your account is allowed by adding your windows account to the running msvsmon application (from Tools->Permissions menu)

    answered Jun 26, 2015 at 4:04

    mithocondria's user avatar

    • Remove From My Forums
    • Вопрос

    • Здравствуйте. У меня не работает отладка в вышеупомянутой студии. Символы установлены, путь к ним указан. Но при нажатии F11, сообщение, что не хватает файлов и предлагает найти их самостоятельно. Подскажите, пожалуйста, в
      чём проблема, что неправильно делаю? Студия установлена в  Windows 10.

      • Изменен тип

        17 августа 2015 г. 6:47
        тема не активна

      • Изменен тип
        Maksim MarinovMicrosoft contingent staff, Moderator
        17 августа 2015 г. 6:47
        ошибка

    Ответы

    • Приложение Windows начинает исполнение кода не с главной функции Вашей программы. Главная функция вызывается средой .net после некоторых подготовительных операций. Запуск отладки клавишами F10-F11, предназначенными для пошаговой
      отладки останавливают программу именно в этом «подготовительном» коде, исходный код которого, действительно, отсутствует. И символы здесь не помогут. Отладку следует начинать с установки точек прерывания
      в своем коде, а запускать клавишей F5.


      Если сообщение помогло Вам, пожалуйста, не забудьте отметить его как ответ данной темы. Удачи в программировании!

      • Помечено в качестве ответа
        Sergey_Bogatov
        17 августа 2015 г. 14:01

    • А это предупреждение говорит о том, пошаговая отладка аксессоров get и set свойств отключена (по умолчанию, действительно, так и есть) и предлагает ее включить.


      Если сообщение помогло Вам, пожалуйста, не забудьте отметить его как ответ данной темы. Удачи в программировании!

      • Помечено в качестве ответа
        Sergey_Bogatov
        17 августа 2015 г. 14:01

    • Сначала точки прерывания, потом F5, после остановки программы в нужном месте начинайте двигаться по шагам, если требуется. Отпустить программу до следующей точки — снова по f5 и т.д. Но имейте ввиду,
      что шаг с заходом в функцию или свойство не из Вашего кода опять приведет к подобному сообщению.


      Если сообщение помогло Вам, пожалуйста, не забудьте отметить его как ответ данной темы. Удачи в программировании!

      • Помечено в качестве ответа
        Sergey_Bogatov
        17 августа 2015 г. 19:08

    Компьютер VS не может подключиться к компьютеру, на котором запущен удаленный отладчик.

    Для удаленного отладчика требуются как минимум эти порты. 4020, 4021, 135 и 445. Как будто все не так сложно, порт по умолчанию не всегда 4020, но меняется для каждой версии VisualStudio (например, это 4024 в VS2019). Взглянем здесь. Самый простой и эффективный способ проверить, открыты ли порты и правильно ли работает связь между двумя концами, — это установить птар на обоих компьютерах. Обратите внимание, что nc командовать в Cygwin is не такая же реализация NetCat и не полезно для наших тестов. Запустите эту команду на компьютере, на котором должен быть запущен удаленный отладчик (не запускайте msvsmon.exe во время теста):

    ncat -v -l <host_ip> <port>

    а затем запустите эту команду на компьютере, на котором работает VisualStudio:

    ncat -v <host_ip> <port>

    Обратите внимание, что host_ip IP-адрес компьютера, на котором запущен удаленный отладчик. Если соединение получено на этом хосте, то брандмауэр не блокирует связь. В этом случае вы должны увидеть что-то вроде этого на удаленном хосте: Ncat: Connection from xxx. Вы можете повторить тест для порта 4020 и 4021. Обратите внимание, что порт 4020 можно изменить в интерфейсе удаленного отладчика, и, как уже было сказано, порт по умолчанию не всегда 4020 но меняйте для каждой версии VisualStudio.

    Возможно, вам также потребуются другие порты для аутентификации (если аутентификация включена в удаленном отладчике) и для развертывания файлов на удаленном компьютере. Вы можете запустить ту же команду
    ncat -v <host_ip> <port> на компьютере, на котором работает VisualStudio. и проверьте следующие порты: 135 и 445. Обратите внимание, что в этом случае вам не нужно запускать nmap на удаленном хосте (службы уже прослушивают эти порты).

    My debugger is not working,
    I’m putting a breakpoint, but in run, time visual studio doesn’t stop on the breakPoint.
    How to fix it?
    There is nothing special in my application, it is a simple web application.
    I am using visual studio 2005.

    I’ve created a new web application project, and on the default.aspx page there is a obout grid control, on the default.cs i am filling a datatable and putting it as datatasource for the grid.
    I was able to debug it, suddenly the debugger is never hit.
    note that the debugger is on the load event.

    asked Mar 10, 2010 at 13:03

    Gaby's user avatar

    GabyGaby

    2,9334 gold badges37 silver badges52 bronze badges

    3

    Find below the steps that solved my problem:

    1. Delete ASP.NET temporary files from C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
    2. Change build configuration to debug from project properties.
    3. Delete bin folder from your project.
    4. Check if compilation debug is set to true in the web.config
    5. iisreset
    6. Rebuild the project.

    Community's user avatar

    answered Mar 10, 2010 at 14:13

    Gaby's user avatar

    GabyGaby

    2,9334 gold badges37 silver badges52 bronze badges

    1

    There are a couple of things that could be wrong:

    • Your source code and assembly could be out of sync — rebuild the application and try again.
    • You could be attached to the wrong process — check to see what process you are attached to.
    • There could be a logical error in your code that is causing your breakpoint to not be hit (i.e. the method you are in is not actually called, logical branching is routing control around the breakpoint, etc.)

    answered Mar 10, 2010 at 13:05

    Andrew Hare's user avatar

    Andrew HareAndrew Hare

    340k71 gold badges636 silver badges631 bronze badges

    4

    Break point was not getting hit, i cleaned and rebuild, but still not hitting,

    I just reopened the page (In my case Controller) and started working fine ..

    answered Jun 7, 2016 at 10:30

    Arun Prasad E S's user avatar

    Arun Prasad E SArun Prasad E S

    9,1338 gold badges73 silver badges84 bronze badges

    1

    When everything failed try this:
    Right mouse button on your project -> Build -> untick ‘Optimize code’

    Or

    I had similar problems when I’ve installed dotPeek and maybe because I don’t have Resharper it was loading symbols from dotPeek symbol server but it couldn’t hit my breakpoint. In that case Open dotPeek and click on Stop Symbol Server.

    answered Jan 16, 2017 at 16:41

    mrosiak's user avatar

    mrosiakmrosiak

    2,5171 gold badge14 silver badges7 bronze badges

    0

    The symbols probably aren’t loaded, that’s why the breakpoint won’t be hit. Did you set the website as the startup project?

    When debugging, what process it attached? It should be w3wp.exe if you want to debug asp.net code.

    answered Mar 10, 2010 at 13:05

    Gerrie Schenck's user avatar

    Gerrie SchenckGerrie Schenck

    22k19 gold badges68 silver badges95 bronze badges

    1

    You might need to set your application in web config so that it can be debugged..

    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
    

    answered Mar 10, 2010 at 13:07

    Aim Kai's user avatar

    Aim KaiAim Kai

    2,9341 gold badge22 silver badges34 bronze badges

    You need to be running in Debug mode, and not Release mode.

    Here’s a detailed article about How to: Enable Debugging for ASP.NET Applications Basically, you can either set debug mode in project properties or in web.config.

    answered Mar 10, 2010 at 13:11

    DOK's user avatar

    DOKDOK

    32.2k7 gold badges60 silver badges92 bronze badges

    try uncheck «Enable the Visual Studio hosting process»
    that in project properties -> debug
    worked for me

    answered Jul 9, 2012 at 12:25

    bresleveloper's user avatar

    bresleveloperbresleveloper

    5,9023 gold badges32 silver badges47 bronze badges

    This can occur when Visual Studio is set to debug Managed code but the code is not managed (managed code is running under the control of the common language runtime (CLR)).

    To fix the problem change the debug mode as shown in the right hand side of the figure below to Native only, Mixed, or Auto.
    enter image description here

    Side note: I recommend not choosing Mixed unless your system has both managed and native code (code that does not run under the CLR) because Visual Studio can’t attach to an already running process in mixed mode. To debug an already running code Visual Studio need to be set to debug in Native only or Managed only.

    answered May 20, 2017 at 22:19

    Rahav's user avatar

    RahavRahav

    1,62015 silver badges18 bronze badges

    I’ve seen the already existing answers have listed many possible causes, but I’d like to add one more: if you’re using post-compilation tools (such as ILMerge), check whether those tools keep your debugging information (is there a .pdb file? or maybe you have embedded it in your compilation output). For those ones who are actually using AfterBuild tasks in their .csproj I really suggest to check out.

    answered Jan 16, 2019 at 17:00

    Davide Cannizzo's user avatar

    Davide CannizzoDavide Cannizzo

    2,6941 gold badge29 silver badges31 bronze badges

    You can enable Debug as below steps.

    1) Right click project solution
    2) Select Debug( can find left side)
    3) select Debug in Configuration dropdown.
    

    Now run your solution. It will hit breakpoint.
    enter image description here

    answered Aug 22, 2019 at 10:04

    Shakeer Hussain's user avatar

    Shakeer HussainShakeer Hussain

    2,0846 gold badges27 silver badges50 bronze badges

    Are you debugging using IIS Express instead of IIS Local. I found IIS Express sometime won’t hit debug points, IIS Local works fine.

    answered Feb 4, 2020 at 2:23

    Dr Zeeshan Patoli's user avatar

    You could be like me to have both a production version (installed via a msi file) and a development version (opened in Visual Studio), and that is why I cannot get some of my breakpoints in the VS triggered today.

    If that is the case you need to uninstall the production version as I think some of the dll files are interfering with my debugging session.

    Clean and Rebuild your solution afterwards should fix the issue.

    answered Nov 4, 2020 at 17:12

    yangli.liy's user avatar

    yangli.liyyangli.liy

    1013 silver badges5 bronze badges

    In Visual Studio 2010

    1. Select Build > Clean {Project Name}
    2. Rebuild Project

    Now Try to rebuild project and try debug

    All the best

    answered Mar 18, 2013 at 2:31

    Syed's user avatar

    My debugger is not working,
    I’m putting a breakpoint, but in run, time visual studio doesn’t stop on the breakPoint.
    How to fix it?
    There is nothing special in my application, it is a simple web application.
    I am using visual studio 2005.

    I’ve created a new web application project, and on the default.aspx page there is a obout grid control, on the default.cs i am filling a datatable and putting it as datatasource for the grid.
    I was able to debug it, suddenly the debugger is never hit.
    note that the debugger is on the load event.

    asked Mar 10, 2010 at 13:03

    Gaby's user avatar

    GabyGaby

    2,9334 gold badges37 silver badges52 bronze badges

    3

    Find below the steps that solved my problem:

    1. Delete ASP.NET temporary files from C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
    2. Change build configuration to debug from project properties.
    3. Delete bin folder from your project.
    4. Check if compilation debug is set to true in the web.config
    5. iisreset
    6. Rebuild the project.

    Community's user avatar

    answered Mar 10, 2010 at 14:13

    Gaby's user avatar

    GabyGaby

    2,9334 gold badges37 silver badges52 bronze badges

    1

    There are a couple of things that could be wrong:

    • Your source code and assembly could be out of sync — rebuild the application and try again.
    • You could be attached to the wrong process — check to see what process you are attached to.
    • There could be a logical error in your code that is causing your breakpoint to not be hit (i.e. the method you are in is not actually called, logical branching is routing control around the breakpoint, etc.)

    answered Mar 10, 2010 at 13:05

    Andrew Hare's user avatar

    Andrew HareAndrew Hare

    340k71 gold badges636 silver badges631 bronze badges

    4

    Break point was not getting hit, i cleaned and rebuild, but still not hitting,

    I just reopened the page (In my case Controller) and started working fine ..

    answered Jun 7, 2016 at 10:30

    Arun Prasad E S's user avatar

    Arun Prasad E SArun Prasad E S

    9,1338 gold badges73 silver badges84 bronze badges

    1

    When everything failed try this:
    Right mouse button on your project -> Build -> untick ‘Optimize code’

    Or

    I had similar problems when I’ve installed dotPeek and maybe because I don’t have Resharper it was loading symbols from dotPeek symbol server but it couldn’t hit my breakpoint. In that case Open dotPeek and click on Stop Symbol Server.

    answered Jan 16, 2017 at 16:41

    mrosiak's user avatar

    mrosiakmrosiak

    2,5171 gold badge14 silver badges7 bronze badges

    0

    The symbols probably aren’t loaded, that’s why the breakpoint won’t be hit. Did you set the website as the startup project?

    When debugging, what process it attached? It should be w3wp.exe if you want to debug asp.net code.

    answered Mar 10, 2010 at 13:05

    Gerrie Schenck's user avatar

    Gerrie SchenckGerrie Schenck

    22k19 gold badges68 silver badges95 bronze badges

    1

    You might need to set your application in web config so that it can be debugged..

    <system.web>
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
    

    answered Mar 10, 2010 at 13:07

    Aim Kai's user avatar

    Aim KaiAim Kai

    2,9341 gold badge22 silver badges34 bronze badges

    You need to be running in Debug mode, and not Release mode.

    Here’s a detailed article about How to: Enable Debugging for ASP.NET Applications Basically, you can either set debug mode in project properties or in web.config.

    answered Mar 10, 2010 at 13:11

    DOK's user avatar

    DOKDOK

    32.2k7 gold badges60 silver badges92 bronze badges

    try uncheck «Enable the Visual Studio hosting process»
    that in project properties -> debug
    worked for me

    answered Jul 9, 2012 at 12:25

    bresleveloper's user avatar

    bresleveloperbresleveloper

    5,9023 gold badges32 silver badges47 bronze badges

    This can occur when Visual Studio is set to debug Managed code but the code is not managed (managed code is running under the control of the common language runtime (CLR)).

    To fix the problem change the debug mode as shown in the right hand side of the figure below to Native only, Mixed, or Auto.
    enter image description here

    Side note: I recommend not choosing Mixed unless your system has both managed and native code (code that does not run under the CLR) because Visual Studio can’t attach to an already running process in mixed mode. To debug an already running code Visual Studio need to be set to debug in Native only or Managed only.

    answered May 20, 2017 at 22:19

    Rahav's user avatar

    RahavRahav

    1,62015 silver badges18 bronze badges

    I’ve seen the already existing answers have listed many possible causes, but I’d like to add one more: if you’re using post-compilation tools (such as ILMerge), check whether those tools keep your debugging information (is there a .pdb file? or maybe you have embedded it in your compilation output). For those ones who are actually using AfterBuild tasks in their .csproj I really suggest to check out.

    answered Jan 16, 2019 at 17:00

    Davide Cannizzo's user avatar

    Davide CannizzoDavide Cannizzo

    2,6941 gold badge29 silver badges31 bronze badges

    You can enable Debug as below steps.

    1) Right click project solution
    2) Select Debug( can find left side)
    3) select Debug in Configuration dropdown.
    

    Now run your solution. It will hit breakpoint.
    enter image description here

    answered Aug 22, 2019 at 10:04

    Shakeer Hussain's user avatar

    Shakeer HussainShakeer Hussain

    2,0846 gold badges27 silver badges50 bronze badges

    Are you debugging using IIS Express instead of IIS Local. I found IIS Express sometime won’t hit debug points, IIS Local works fine.

    answered Feb 4, 2020 at 2:23

    Dr Zeeshan Patoli's user avatar

    You could be like me to have both a production version (installed via a msi file) and a development version (opened in Visual Studio), and that is why I cannot get some of my breakpoints in the VS triggered today.

    If that is the case you need to uninstall the production version as I think some of the dll files are interfering with my debugging session.

    Clean and Rebuild your solution afterwards should fix the issue.

    answered Nov 4, 2020 at 17:12

    yangli.liy's user avatar

    yangli.liyyangli.liy

    1013 silver badges5 bronze badges

    In Visual Studio 2010

    1. Select Build > Clean {Project Name}
    2. Rebuild Project

    Now Try to rebuild project and try debug

    All the best

    answered Mar 18, 2013 at 2:31

    Syed's user avatar

    Понравилась статья? Поделить с друзьями:
  • Лучшая панель задач для windows 10
  • Локальный компьютер не входит в отказоустойчивый кластер windows sql
  • Лучшая ос на базе linux для перехода с windows
  • Локальный компьютер не входит в кластер отработки отказа windows
  • Лучшая настройка эквалайзера для наушников windows 10