All of a sudden the control is not stopping at break point.
Thanks
saravanan
"saravanan" <sara...@unicomp.com.sg> wrote in message
news:eE$IL0KWD...@TK2MSFTNGP11.phx.gbl...
"saravanan" <sara...@unicomp.com.sg> schrieb:
> All of a sudden the control is not stopping at break point.
Are you sure the Debug configuration is selected (combobox in the
toolbar)?
HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
I'm wondering if it would be worth the time to write a little macro that
checked build mode before you tried to run the app in the IDE.
Something like:
Imports System.Windows.Forms
Private Sub DebuggerEvents_OnEnterRunMode( _
ByVal Reason As EnvDTE.dbgEventReason) _
Handles DebuggerEvents.OnEnterRunMode
Dim sol As Solution
sol = DirectCast(DTE.Solution(), Solution)
If sol.SolutionBuild.ActiveConfiguration.Name <> "Debug" Then
MessageBox.Show("You are starting the program from the IDE" _
& ", you do not have the Debug Build of the solution
selected.", _
"Enter Run Mode")
End If
End Sub
I put the above in EnvironmentEvents module in the MyMacros macro project.
Outputting to the Debug pane of the output window may be
better. However! It is placed at the top of the window, and scrolls out of
sight.
Dim win As Window =
DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
win.Visible = True
Dim ow As OutputWindow = DirectCast(win.Object, OutputWindow)
Dim owpane As OutputWindowPane
Try
owpane = ow.OutputWindowPanes.Item("Debug")
Catch e As System.Exception
owpane = ow.OutputWindowPanes.Add("Debug")
End Try
owpane.OutputString(System.Environment.NewLine)
owpane.OutputString("You are starting the program from the IDE" _
& ", you do not have the Debug Build of the solution selected.")
owpane.OutputString(System.Environment.NewLine)
owpane.OutputString(System.Environment.NewLine)
Replace the MessageBox.Show with the above code.
Just a thought
Jay
"Herfried K. Wagner" <hirf...@m.activevb.de> wrote in message
news:uxUiBwOW...@TK2MSFTNGP12.phx.gbl...
#if not debug then
if System.Diagnostics.Debugger.IsAttached then
msgbox "attention: release config"
end if
#end if
;-)
--
Armin
The code you gave executes within the program when you run your program.
I can code the macro once in the IDE, whereas your code I would need to put
in every program.
Otherwise yours works ;-)
Of course either check would be better if it asked you if you wanted to
execute it any way... Right now I am not seeing a way to stop entering the
debugger during the OnEnterRunMode event.
Jay
"Armin Zingler" <az.n...@freenet.de> wrote in message
news:OQJZj2RW...@tk2msftngp13.phx.gbl...