Click here to Skip to main content
13,596,895 members
Click here to Skip to main content
Add your own
alternative version


4 bookmarked
Posted 10 Aug 2011
Licenced CPOL

Why Visual Studio Debugger is not working for my Silverlight Application?

, 10 Aug 2011
Rate this:
Please Sign up or sign in to vote.
Here is the solution to why Visual Studio debugger is not working for your Silverlight applicaton

"Why my Visual Studio debugger is not working for my Silverlight application?" - it's not a new question. People ask this several times in different forums. If you search on the internet, you may probably find the solution. But, in this post, I am just sharing the solution once again for my blog readers and anyone who may face a similar issue in the future.

In this post, I will share with you 4 small tips. Just follow the steps from top to bottom and let me know which one resolved your problem. This tip might not be a new thing for you but don't forget to share with others. This could be useful for them.

One of my blog readers "Raksha" was facing an issue with her Visual Studio debugger. She was not able to find out the way to enable the debugging feature and came to my blog to ask me this question for help:

While working with the Silverlight application, I found that it is not following the breakpoints while running the application. Please suggest a way so that I can debug the Silverlight application using the breakpoints.

Solution One

There could be some possibilities for that, but let me first tell you that the debugger works in Internet Explorer only. If you are using any browser other than Internet Explorer, you may notice this issue. There are some hacks but I am not interested in discussing that here. So in such case, just use Internet Explorer and that could help you.

Solution Two

If you are facing the same issue in Internet Explorer and my friend @debug_mode is still searching the way to debug it Winking smile, you should first check whether the Silverlight debugging is enabled for your Silverlight project. To do this, just follow the below mentioned steps:

  • Right click on the Web Application project that comes with the Silverlight project.
  • From the context menu, chose "Properties". This will open the properties window in the screen.

How to enable the Silverlight debugging

  • As shown in the above screenshot, click the tab named "Web" from the left panel. This will open the web settings window in the right panel
  • Scroll the Window down until you see the "Debuggers" group (as shown above)
  • There, the checkbox for "Silverlight" should be checked by default, if not, click it to check.
  • Save settings and restart the application in debug mode by pressing F5

Generally, this is one of the main reasons and people face it because this option is unchecked.

Solution Three

If the above two solutions fail, there could be an issue with your Visual Studio debugger. It may fail to attach the respective process in memory. To resolve this, run the Silverlight application in debug mode and check whether the breakpoint details are loaded in memory. If not, attach the process of the Silverlight application to Internet Explorer and this could load the breakpoint now.

Solution Four

If you are still facing the same issue after following the above three steps, you may try out a different process which is not recommended though, but sometimes, that helps. Many times, I faced the same issue where it was unable to load the debugging information and the above mentioned solutions failed. So, what should be done in such a scenario? Follow the below steps:

  • First of all, clean the solution from the Visual Studio
  • Close the IDE once you cleaned the solution
  • Go to the solution directory and remove all "bin" and "obj" directories
  • Go to the "ClientBin" folder and remove the .XAP files
  • Open the solution in Visual Studio now
  • Rebuild the solution and hit F5 to start the debugging

This time, it will load for sure and if not, try to reset the Visual Studio settings by calling the "devenv /resetsettings" command. Again, the final solution is not recommended unless you failed to resolve this by following the first three steps.

Still Have Issues?

Drop a line below with your findings. If you have any better solution for that, also share it here. This could help others to resolve it by following your steps. Thank you for reading this tip. Don't forget to share with others.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Kunal Chowdhury «IN»
Software Developer (Senior)
India India
Kunal Chowdhury is a Microsoft "Windows Platform Development" MVP (Most Valuable Professional), a Codeproject Mentor, Telerik Developer Expert, Nokia Developer Champion, Windows 10 Champion, Microsoft Rockstar, Speaker in various Microsoft events, Author, passionate Blogger and a Software Engineer by profession.

He is currently working in an MNC located in India. He has a very good skill over XAML, C#, Silverlight, Windows Phone, WPF and Windows Store (WinRT) app development. He posts his findings, articles, tutorials in his technical blog and CodeProject.

Book authored:

Connect with me on:

My CodeProject Awards/Prizes:

You may also be interested in...

Comments and Discussions

QuestionIn technical blog: Why Visual Studio Debugger is not working for my Silverlight Application? Pin
s yu12-May-15 7:57
members yu12-May-15 7:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web02 | 2.8.180621.3 | Last Updated 10 Aug 2011
Article Copyright 2011 by Kunal Chowdhury «IN»
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid