Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

can't debug!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lord Zoltar - 18 Feb 2008 03:20 GMT
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?
RobinS - 18 Feb 2008 06:45 GMT
Make sure your build configuration is set to Debug instead of Release.

RobinS.
--------------------------
>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
[quoted text clipped - 3 lines]
> but can't seem to find any way to fix it.
> Anyone got a suggestion?
Morten Wennevik [C# MVP] - 18 Feb 2008 08:27 GMT
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.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

> 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
[quoted text clipped - 3 lines]
> but can't seem to find any way to fix it.
> Anyone got a suggestion?
Morten Wennevik [C# MVP] - 18 Feb 2008 17:27 GMT
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.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

> 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
[quoted text clipped - 3 lines]
> but can't seem to find any way to fix it.
> Anyone got a suggestion?
Lord Zoltar - 19 Feb 2008 17:35 GMT
On Feb 18, 12:27 pm, Morten Wennevik [C# MVP]
<MortenWenne...@hotmail.com> wrote:
> 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.
Lord Zoltar - 01 Mar 2008 19:25 GMT
> On Feb 18, 12:27 pm, Morten Wennevik [C# MVP]
>
[quoted text clipped - 10 lines]
> 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?
Morten Wennevik [C# MVP] - 03 Mar 2008 08:32 GMT
> > On Feb 18, 12:27 pm, Morten Wennevik [C# MVP]
> >
[quoted text clipped - 17 lines]
> 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.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

Lord Zoltar - 06 Mar 2008 01:08 GMT
On Mar 3, 3:32 am, Morten Wennevik [C# MVP]
<MortenWenne...@hotmail.com> wrote:

> Well, two possible scenarios are, there are corrupt beta files left on the
> system, or maybe corrupt framework files.
[quoted text clipped - 8 lines]
> 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?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.