Solved

visual studio won't stop on debug.print statement

Posted on 2013-10-24
8
590 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

867 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

22 Experts available now in Live!

Get 1:1 Help Now