Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Debug not showing output in Expressions window (Read 13854 times)
Chris Mower
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2013
Debug not showing output in Expressions window
Sep 6th, 2013 at 12:28pm
Print Post  
Hi,

I have a clean new install of VS2010 running on Windows 7 Professional, Arduion IDE 1.53 and an Arduino MEGA2560.

Using the simple Blink sketch with the addition of a simple variable iVal for the delay this compiles, uploads and runs OK. I have set a breakpoint and in the Breakpoint->When Hit dialog I have enabled the 'Print a message' and have put {iVal}

When I hit F5 the code uploads and runs and the light blinks as it should. The Expressions on Com4 dialog box opens but doesn't show the debug output, rather it shows a greyed out  message 'Waithing for debug data'.

I have watched the YouTube video showing how to get this working and as far as I can tell I have done all of the things that were required. Clicking on the project I have enabled Micro Debug as Full. 

There would appear to be some communication since if I enable the Report Analogs the window showing a trace of the analog inputs appears and it looks to be valid. The Report Digitals also seems to work although there doesn't seem to be any updating of the LED blink port.

Do you have any idea as to why there is no debug information appearing? Have I got something set up wrong perhaps?

Regards,
Chris
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #1 - Sep 6th, 2013 at 2:42pm
Print Post  
Hi Chris,

Can you please confirm the following:-

1) When debug starts does the "Micro Trace" output window automatically display or the "Micro Message"? One of these tool windows should automatically display in place of the "Micro Build" output window

2) The expression view will stay "grayed out" until the first debugger packet arrives. Is you breakpoint in a condition? Inside or near an IF statement? If so be aware that a breakpoint on an IF will only be reported when the IF is true. Unlike a normal debugger breakpoints are executed AFTER the current line of code.

3) Are you sure your code that is not running is not in a never ending while() {} which would prevent the breakpoint from being executed?

4) Does your code use Serial.begin()? If so at what speed?

5) Due to the above external factors, the simplest test to provide the debugger is working, would be a breakpoint in an empty loop() with {millis()} as the "When Hit" message. or better still remove all breakpoints and Visual Micro should add one for you automatically.

If these don;t give you clues to the problem please post a code snippet explaining which line has the breakpoint.

Thanks
  
Back to top
IP Logged
 
Chris Mower
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2013
Re: Debug not showing output in Expressions window
Reply #2 - Sep 6th, 2013 at 6:39pm
Print Post  
OK I have installed it on another PC, same basic configuration except this one is running VS2008. It is doing exactly the same as the other machine so let me see if I can answer your questions.

1. When pressing F5 it compiles and uploads. The lights on the board show it uploading. The program starts and there are two windows appear. One is the Output window which has 'Show output from -> Micro Debug Trace. That says Program Started 'Blink' version 1. The other window has Blink in the top left corner and Expressions on Com17, which is the correct port for the Arduino on this pc. The application is running on the Arduino as the LED begin to flash.

2. I have tried a breakpoint on every line one at a time and it never shows any debug output.

3. The code is the very simple 'blink' program from the Arduino examples with a simple variable used to replace the delay time of 1000 so that there would be a variable to get debug information from. I will paste the code at the bottom.

4. No, there is no serial code whatsoever. Should there be? 

5. Tried the suggestion and it still did not break.


I have to say that from what I have seen of the program it looks as if it will be fantastic for working on Arduino code and I certainly intend to buy a three machine licence. I am really looking forward to getting to the bottom of the reason why this isn't working for me.

Regards,
Chris


Here is the code that I am using

Code
Select All
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
int del = 1000;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay( del );               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay( del);               // wait for a second
  --del;
  if ( del < 500 )
    del = 1000;
}
 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #3 - Sep 6th, 2013 at 8:18pm
Print Post  
Hi,

Thanks for the clear report. No you do not need to add any code to make the debugger work.

You are right, everything is on so it should be working.

Can you please email these two things to info [at] visualmicro.com

1) Switch on "tools>options>visual micro>compiler>show build folder"

2) Make sure you have only 1 breakpoint in your project

3) Start debug

4) Switch to the "Micro Build" output window

5) CTRL+CLICK the file:/// build folder in the "Micro Build" output window. 

6) Email the [sketchname].cpp

7) Email a zip of the "\Visual Micro" folder below the sketch

Thanks very much

  
Back to top
IP Logged
 
Chris Mower
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2013
Re: Debug not showing output in Expressions window
Reply #4 - Sep 6th, 2013 at 8:50pm
Print Post  
Tim,

what address should I send the email to?

Regards,
Chris
  
Back to top
 
IP Logged
 
Chris Mower
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2013
Re: Debug not showing output in Expressions window
Reply #5 - Sep 6th, 2013 at 8:53pm
Print Post  
Sorry, ignore my last. I missed the anti-sppam [at] in the address ain your email Embarrassed
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #6 - Sep 6th, 2013 at 11:43pm
Print Post  
Thanks for sending the files. 

I think the best action is to close VS and run the Visual Micro installer, select Uninstall then run again and Install.

If that doesn't fix it please zip and email the Blink sketch folder.

It's a strange one!

Thanks very much
  
Back to top
IP Logged
 
marceloxpto
Newbies
*
Offline


Posts: 2
Joined: Sep 6th, 2013
Re: Debug not showing output in Expressions window
Reply #7 - Sep 6th, 2013 at 11:48pm
Print Post  
i have the same problem
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #8 - Sep 6th, 2013 at 11:53pm
Print Post  
@marceloxpto 

if the uninstall then reinstall doesn't work then...

would you please switch on the "show build folder" in tools>options and then perform a debug upload. then zip and email both the .cpp in the build folder and the sketch folder to info [at] visualmicro.com

Sorry to ask but with two configs to look at it will be easier to find the problem. Thanks

Can you confirm if it is the first time that you installed Visual Micro today? 

and that you are using VS2010?
« Last Edit: Sep 7th, 2013 at 12:24am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #9 - Sep 7th, 2013 at 12:53am
Print Post  
Hi,

I have replicated the problem by installing an older version and upgrading.

The solution is to run the Visual Micro uninstall and then run the re-install

Thanks for the making the effort to report this!
  
Back to top
IP Logged
 
Chris Mower
Newbies
*
Offline


Posts: 5
Joined: Sep 5th, 2013
Re: Debug not showing output in Expressions window
Reply #10 - Sep 8th, 2013 at 6:26am
Print Post  
Tim,

That seems to have fixed it as I am now getting debug info.  Smiley

On a separate tack, is there any way to tell what version of the Visual Micro add in is installed?

Cheers,
Chris
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #11 - Sep 8th, 2013 at 5:00pm
Print Post  
Hi Chris,

Thanks for the update, good to know it is working. You don;t need it but for others there is a new release on our downloads site which negates the need to uninstall then re-install. The Atmel Gallery will be updated to 1309.4.2 during the next few days but in the meantime use visualmicro.com, the standard download of Visual Micro.

Chris, the latest Visual Micro version can be viewed in Tools>Options>Visual Micro>Version. From sp2 the same options also show a MinorVersion which is the service pack number.
  
Back to top
IP Logged
 
marceloxpto
Newbies
*
Offline


Posts: 2
Joined: Sep 6th, 2013
Re: Debug not showing output in Expressions window
Reply #12 - Sep 9th, 2013 at 2:28pm
Print Post  
Hi, I've reinstalled several times, but the problem continues.
Now, I installed on my sister's machine, and it worked !!! Smiley 
In the my machine, I distractedly, not ticked the "I have read, Understood and accept this disclaimer" field and then clicked on "30 day trial".  Sad 

I compared the two procedures, and found one difference. On the machine where the Visual Micro it is not running, the license's key field is marked "REGISTERED" and on the another machine (running) the license's key  field is marked "TRIAL".

I reinstalled the Atmel Studio and Visual Micro, but the "license key" field continues as "REGISTERED".

maybe that's the problem. (?) I can do something to solve this?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug not showing output in Expressions window
Reply #13 - Sep 9th, 2013 at 3:50pm
Print Post  
Hi please close the ide's and upgrade to sp2 of visual micro from here http://visualmicro.codeplex.com/

The problem was that a file was not copied over when upgrading an older version of visual micro.

Thanks
« Last Edit: Sep 9th, 2013 at 4:11pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint