can't debug!

  • Thread starter Thread starter Lord Zoltar
  • Start date Start date
L

Lord Zoltar

I finally got around to taking VS 2008 beta for a test spin, and I
can't debug! I add a breakpoint to any line in my application, and
when I hit "Debug", my program starts, and then immediately ends,
skipping the breakpoint. It's probably a config setting somewhere, but
I've never seen anything like this before. I've been looking for hours
but can't seem to find any way to fix it.
Anyone got a suggestion?
 
There could be any number of reasons for this. Some of which include RELEASE
build (build must be DEBUG), using PDB for a different assembly version than
is what actually running (can happen in a module environment, check output),
an exception swallowed by Windows occurs prior to reaching the breakpoint
(use try/catch around the event code to trap an exception).

Since your program appears to end as soon as it has started I suspect there
is something wrong with your program rather than Visual Studio. What kind of
application is it? (Web/Windows/Console). If you could show us some code it
would help.

PS! VS 2008 Beta has is long gone and is now replaced by VS 2008 RTM and
Express version.
 
If you are using 64 bit XP or Vista, breakpoints won't work unless you
compile the program for x86 CPU (don't ask me why, but this goes for
Edit-And-Continue as well.) Use the Configuration Manager in the solutions
properties to change targetted CPU.
 
If you are using 64 bit XP or Vista, breakpoints won't work unless you
compile the program for x86 CPU (don't ask me why, but this goes for
Edit-And-Continue as well.) Use the Configuration Manager in the solutions
properties to change targetted CPU.

No, it was regular 32-bit XP. I had the build set to Debug. It would
happen with even the simplest of all "Hello World!" forms
applications.
But I've been out of the loop for a while, as I had no idea that VS
2008 was out now, past beta. I guess I'll have to download the trial
version or express edition and see if that solves the problem.
 
No, it was regular 32-bit XP. I had the build set to Debug. It would
happen with even the simplest of all "Hello World!" forms
applications.
But I've been out of the loop for a while, as I had no idea that VS
2008 was out now, past beta. I guess I'll have to download the trial
version or express edition and see if that solves the problem.


So I got around to installing C# express and I am still having the
same problem: I create a new windows Form app, and add a breakpoint to
the InitializeComponent() line and when I run the debugger, it breaks
at that line. When I hit resume, the app end. When I don't have the
breakpoint, the application doesn' teven run.
Any ideas why this is happening?
 
Lord Zoltar said:
So I got around to installing C# express and I am still having the
same problem: I create a new windows Form app, and add a breakpoint to
the InitializeComponent() line and when I run the debugger, it breaks
at that line. When I hit resume, the app end. When I don't have the
breakpoint, the application doesn' teven run.
Any ideas why this is happening?

Well, two possible scenarios are, there are corrupt beta files left on the
system, or maybe corrupt framework files.

Try compiling to .Net 2.0 (not sure if this is available in the express
edition, but VS 2008 comes with the ability to compile a project to .Net 2.0,
3.0 or 3.5. This option is found in the project properties). If it runs
fine in .Net 2.0 you may want to try to get rid of any beta files still
lingering. I've had problems with the VS2008 designer insisting on using
beta controls in the ToolBox

You are mentioning a winform application, do console and web applications
fail as well?

Do VS2005 work?

I suspect you have a corrupt system which the removal of vs2008 beta didn't
fix. I'm afraid I don't have any good advice on how to fix it.
 
Well, two possible scenarios are, there are corrupt beta files left on the
system, or maybe corrupt framework files.

Try compiling to .Net 2.0 (not sure if this is available in the express
edition, but VS 2008 comes with the ability to compile a project to .Net 2..0,
3.0 or 3.5.  This option is found in the project properties).  If it runs
fine in .Net 2.0 you may want to try to get rid of any beta files still
lingering.  I've had problems with the VS2008 designer insisting on using
beta controls in the ToolBox

You are mentioning a winform application, do console and web applications
fail as well?

I haven't yet tried web apps, but console apps also fail to run
properly in debug mode.
Do VS2005 work?

No. VB.NET 2005 had the same problem, but I never had much chance to
play with it. But that was a while ago I had it installed, and I did a
clean re-install of the OS last spring.
I suspect you have a corrupt system which the removal of vs2008 beta didn't
fix.  I'm afraid I don't have any good advice on how to fix it.

Would different C# tools make a difference? I know that there are some
plugins for Eclips for C# editing, but do they also include a seperate
debugger and compiler or do they require Microsoft's to be installed?
 
Back
Top