Solved

visual studio won't stop on debug.print statement

Posted on 2013-10-24
8
598 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

624 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