Solved

visual studio won't stop on debug.print statement

Posted on 2013-10-24
8
592 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 75

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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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
 
LVL 75

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 75

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to With line 4 57
VB.Net - KeyPress Event 4 36
Help with consolidating excel files using VB.net 2 21
Help with preventing downloading a zip file 10 35
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…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

785 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