Trouble stepping into an overridden method

L

lothar.behrens

Hi,

I have a base class that defines a MustOverride method. In a derived
implementation class I
am not able to set a break point nor stepping into by a call from the
base class.

What would be wrong ?

Are there propably wrong project settings ?

The function gets called, because I see the results in the
application.

(Visual Studio 2005)

Thanks, Lothar

Imports System.IO

Public MustInherit Class Application_Base

Protected MustOverride Sub _GetApplication(ByVal sender As
Object, ByVal e As System.EventArgs)
Sub GetApplication(ByVal sender As Object, ByVal e As
System.EventArgs)
_GetApplication(sender, e)
End Sub


End Class

Public Class Application
Inherits Application_Base


Protected Overrides Sub _GetApplication(ByVal sender As Object,
ByVal e As System.EventArgs)

' Do the work

End Sub

End Class
 
P

Phill W.

I have a base class that defines a MustOverride method. In a derived
implementation class I am not able to set a break point nor step
into by a call from the base class.

So long as you have "Debug" as the Active Configuration, you should be
able to set breakpoints in the override.
Public MustInherit Class Application_Base

Protected MustOverride Sub _GetApplication( _
, ByVal sender As Object, ByVal e As System.EventArgs)
Sub GetApplication(ByVal sender As Object, _
, ByVal e As System.EventArgs)
_GetApplication(sender, e)
End Sub
Public Class Application
Inherits Application_Base
Protected Overrides Sub _GetApplication( _ByVal sender As Object,
, ByVal e As System.EventArgs)
' Do the work
End Sub

Is there any actual /code/ in this method?
If /not/, the CLR may "edit it out" when it compiles the code (why call
a method with nothing in it?), thereby losing your breakpoint.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top