Solved

visual studio won't stop on debug.print statement

Posted on 2013-10-24
8
588 Views
Last Modified: 2013-10-24
Hi,

When debugging a small program I downloaded (Net DDE) I can't seem to get any debug.print outputs.  I'm more accustomed to VBA, and I'm not sure of the difference between a write and print, but neither prints to the immediate window.

I've selected the Tools / Options / Debugging / General / Redirect all Output  option, but nothing shows up.

Additionally, when I put a breakpoint on a debug.print line and start debugging, it actually MOVES the breakpoint to the next line!  I don't understand this behavior, but I guess it's some setting.  Under my project properties, in the Debug tab on the left, I selected the 'Debug' configuration.  Still didn't work.

What can I do?

Thanks!
0
Comment
Question by:ugeb
  • 3
  • 3
  • 2
8 Comments
 
LVL 10

Accepted Solution

by:
Anthony Berenguel earned 500 total points
ID: 39598738
Try running it in DEBUG mode instead of RELEASE mode.
0
 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 39598745
solutions configurations dropdown
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39599030
Go to the project's properties page (Project->XXX Properties). Ensure that the "Define DEBUG constant" on the Build tab is checked.

Screenshot
0
 
LVL 11

Author Closing Comment

by:ugeb
ID: 39599437
Wow, three different places to  choose between release and debug ...  That last one was the clincher.

@kaufmed, my properties page looks different from yours.  Instead of 'Build', I have 'compile', and I couldn't even find the 'Define DEBUG CONSTANT'.  Are you using a different version of VS? I'm using VS 2010 Ultimate.

Thanks!
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39599561
What kind of project do you have? Is it a web site project?

In any event, if you didn't change any of the default settings, then setting the configuration mode as aebea suggested will have that setting enabled anyway.
0
 
LVL 11

Author Comment

by:ugeb
ID: 39599578
No, it's not a website project, but yes, aebea's suggestion did finally let me see the output.
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 39599631
OK, your question was for VB. The screens are slightly different between C# (what I posted) and VB. For VB it's the "Compile" tab under the "Advanced Compile Options" button:

Screenshot
0
 
LVL 11

Author Comment

by:ugeb
ID: 39599650
Okay, good to know, thank you.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now