Debugging Fails, Breakpoints not hit.
Last post 09-22-2008 3:42 PM by VijayViswanathan. 8 replies.
Sort Posts:
04-15-2008 8:59 AM
Debugging Fails, Breakpoints not hit.

This problem exists on two machines here, one running XP SP2 Home, the other running Vista Home Premium SP1, both using VS2008 Standard with Silverlight Tools for Visual Studio 2008

To reproduce this problem follow these steps.

1. First make sure that your IE browser is set to "Disable script debugging". (Since we are working on a Silverlight 2 .NET3.5 application, there is no Javascript used.)

2. Open a new project in VS2008 and create a Silverlight application. Choose to add a new Web to the solution for hosting the control.

3. Open the Page.xaml code behind and place a breakpoint on the InitializeComponent() statement.

4. Click F5 to run and click OK in the dialog to modify the Web.config file to enable debugging.

5. The breakpoint is hit. Now end the program execution.

6. Right click on the Web project and select Properties Pages.

7. Select Start Options and change the Specific page from "SilverlightApplication1TestPage.aspx" to "SilverlightApplication1TestPage.html" (note that this page contains Javascript). Click OK.

8. Click OK

9. Click F5 to run. Now click Yes in the dialog to continue debugging even though script debugging is disabled (we don't care about script debugging since we are using managed code in a Silverlight 2 application).

10. The breakpoint is NOT hit. Debugging is disabled. Now end the program execution.

11. Repeat steps 6, 7, and 8 to change the specific start page back to "SilverlightApplication1TestPage.aspx".

12. Click F5 to run. Notice that the same warning dialob box is presented even though our start page has no Javascript. Click Yes.

13. The breakpoint is NOT hit. Debugging remains disabled.

brucemartin

Loading...
Joined on 03-13-2008
New York City
Posts 52
04-15-2008 11:54 AM
Re: Debugging Fails, Breakpoints not hit.

Hi Bruce, you should post your screenshot that doesn't have Silverlight checked box. I think this is the main point. I'm not sure why there is no SL checked box in your VS 2008 standard edition.

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,335
04-15-2008 12:42 PM
Re: Debugging Fails, Breakpoints not hit.

It has been suggested in other posts on this forum that a way to recover debugging is to check the Silverlight checkbox on the Web project's Properties Pages. But in my case there is no Silverlight Checkbox. See the screen shot. Is this another bug?

Properties Pages

brucemartin

Loading...
Joined on 03-13-2008
New York City
Posts 52
04-15-2008 10:22 PM
Re: Debugging Fails, Breakpoints not hit.

 Try to remove the silverlight link first. Then re-add the silverlight link, on the link page check Enable silverlight debugging.

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

sladapter

Loading...
Joined on 03-05-2008
Indiana, US
Posts 2,489
04-16-2008 8:18 AM
Re: Debugging Fails, Breakpoints not hit.

Sorry, but I'm new to Visual Studio. Can you please explain what the Silverlight link is? And how to remove it? And were is the link page? Thanks.

brucemartin

Loading...
Joined on 03-13-2008
New York City
Posts 52
04-16-2008 9:51 AM
Marked as Answer
Re: Debugging Fails, Breakpoints not hit.

If you never add Silverlight Link to your Web project, then debug silverlight code won't work.

On your Web Project Property Page you can see Silverlight Links Tab (the last tag on your screen shot). Click that tab you can see the silverlight project link to the web project.  You can remove or add link here. You can also Right click your project to choose Add Silverlight Link. Sometime the debug stops working, you can try to remove the link and re-add it.

 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

sladapter

Loading...
Joined on 03-05-2008
Indiana, US
Posts 2,489
04-16-2008 4:17 PM
Re: Debugging Fails, Breakpoints not hit.

Yes that works. The Silverlight link was there, so I removed it and then added it again. Debugging worked again. Great.

brucemartin

Loading...
Joined on 03-13-2008
New York City
Posts 52
04-16-2008 10:59 PM
Marked as Answer
Re: Debugging Fails, Breakpoints not hit.

 Hi Bruce,

Allen and Yi-lun said that not having the Silverlight checked in VS 2008 standard edition is the known issue..  Allen said that he is able to reproduce this issue. As I told you earlier, please submit this issue to MS Connect. http://connect.microsoft.com/VisualStudio

(Yes. I already mail you about this but I just posted about it here so other people can read if they have similar issue. ) 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlSync

Loading...
Joined on 09-16-2005
Singapore
Posts 2,335
09-22-2008 3:42 PM
Re: Debugging Fails, Breakpoints not hit.

Thank you, this solved a problem I was having with the debugger not getting loaded. Removing and adding solved this. Big Smile

VijayViswanathan

Loading...
Joined on 09-22-2008
Posts 1
Page view counter