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

debugging from .exe file

1 view
Skip to first unread message

Ed White

unread,
Nov 14, 2008, 12:55:02 PM11/14/08
to
I'm using VS 2008. When I run a program from within VS, debugging is no
problem. However, sometimes I go into the /Projects/...bin/Debug folder and
run the program directly from the .exe file. When it encounters an
exception, I cannot debug it as expected. For example,
Sub Main()
Stop
End Sub

If I compile the above, naming it 'Test', and run Test.exe, this is what
happens:

1. A window comes up saying "Test has encountered a user-defined
breakpoint." (If this had been an exception instead of Stop, it says "Test
has encountered a problem and needs to close...") I click on 'Debug' in the
window.

2. A window pops up entitled "Visual Studio Just-In-Time Debugger" which
allows me to select either a new instance of VS or an already running
instance, e.g. "Output: Visual Studio 2008". It works the same below
regardless, but for this example I select the latter (which has the above
code in it) and click Yes.

3. A window pops up entitled "Microsoft Visual Studio" saying "There is no
source code available for this location." If I click OK, the window
disappears but nothing else happens. If I click on the 'Step Into' debugging
icon, the program then highlights the Stop command in yellow and allows me to
debug. If it was not a Stop command but an actual Exception, then clicking
the Step icon either stops the program or gives me another window "Unwinding
Program Failed--Debugger failed to unwind the program..."

In VS Tools->Options->Debugging, I have, among other things, the following
checked:
Enable breakpoint filters
Enable the expection assistant (but not Unwind the call stack on unhandled
exceptions)
Enable Just My Code (with the 2 boxes below checked)
Under the Just-In-Time option, I have all 3 (Managed, Native, and Script)
checked.

So how do I get the debugger to work properly when I run a program from the
.exe file?
--
Ed

Ralph

unread,
Nov 14, 2008, 4:27:59 PM11/14/08
to

"Ed White" <ewh...@newsgroups.nospam> wrote in message
news:C7B9B424-381C-4E9B...@microsoft.com...
> I'm using VS 2008. ...

This newsgroup is a legacy group for 'classic' VB (VB6 and lower).

For dotNet questions you are advised to post to a dotNet newsgroup, where
more people who use that product hang out.

They will have either "dotNet" or "vsnet" in the URL.

-ralph


0 new messages