Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debug mode not working

9 views
Skip to first unread message

saravanan

unread,
Aug 2, 2003, 12:18:25 AM8/2/03
to
Hi,

All of a sudden the control is not stopping at break point.

Thanks
saravanan


Jerry

unread,
Aug 2, 2003, 1:37:09 AM8/2/03
to
Make sure that the piece of code was last compiled in debug. This can
happen if you have som code that was not compiled in debug.

"saravanan" <sara...@unicomp.com.sg> wrote in message
news:eE$IL0KWD...@TK2MSFTNGP11.phx.gbl...

Herfried K. Wagner

unread,
Aug 2, 2003, 7:48:34 AM8/2/03
to
Hello,

"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


Jay B. Harlow [MVP - Outlook]

unread,
Aug 2, 2003, 11:03:17 AM8/2/03
to
Herfried,
Changing to release mode bit me again last night. :-(

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...

Armin Zingler

unread,
Aug 2, 2003, 11:49:37 AM8/2/03
to
"Jay B. Harlow [MVP - Outlook]" <Jay_H...@email.msn.com> schrieb

> Herfried,
> Changing to release mode bit me again last night. :-(
>
> 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.

what about

#if not debug then
if System.Diagnostics.Debugger.IsAttached then
msgbox "attention: release config"
end if
#end if

;-)


--
Armin

Jay B. Harlow [MVP - Outlook]

unread,
Aug 2, 2003, 2:20:35 PM8/2/03
to
Armin,
The macro I gave executes within the IDE when you attempt to run your
program.

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...

0 new messages