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
Normal Topic Debugg only start once per VS2012 restart... (Read 6218 times)
SweFredrik
Newbies
*
Offline


Posts: 2
Joined: Mar 5th, 2014
Debugg only start once per VS2012 restart...
Aug 15th, 2014 at 6:29am
Print Post  
Hi,

Im working on a sketch originally created in the arduino IDE. When opend in VS2012, the debugg starts ok. Serial windows presenting initiation message from the two I2C devices, and the "parameter window" is showing the correct "millis" value, and other selected conditions. 

When I do a change, and hit F5 again, or the green "play button", it restarts, and uploads ok according to the build messages. But after that nothing happens. Message windows does not present anything, and the the parameter windows goes away after a while. 

When restarting VS2012 again, it works as it should.

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


Posts: 12072
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugg only start once per VS2012 restart...
Reply #1 - Aug 16th, 2014 at 9:44pm
Print Post  
Hi,

This might be one of two things.

1)
If you have a break point that stops/pauses early in the arduino startup process then it is possible the breakpoint has been hit but visual micro does not know about it. In this case use the serial monitor to send a 'c' char. This forces a "debug continue"

2)
If the problem is not 1) then instead of re-starting the ide, try un-ticking  and re-ticking the connect checkbox on the serial monitor. 

If 2) works then tick the "auto re-connect" checkbox on the serial monitor to see if the debugging will start automatically

Does this help? If not then please say which board you are using.

Thanks
  
Back to top
WWW  
IP Logged
 
Yuri Bond
Newbies
*
Offline


Posts: 4
Joined: Aug 19th, 2014
Re: Debugg only start once per VS2012 restart...
Reply #2 - Aug 26th, 2014 at 6:17pm
Print Post  
Same for me 
I use VS 2013 and Arduino Due

It debug once
then you stop debuging 
and on next debug everything is compiling and uploading as it should but serial monitor does not connect 

connect check box does nothing 

it is simply does not connect to serial second time

only restart VS can fix it
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12072
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugg only start once per VS2012 restart...
Reply #3 - Aug 26th, 2014 at 6:21pm
Print Post  
Hi Yuri,

Can you please tick the Re-connect check box on the "Serial Monitor" to see if this makes it reliable??

Thanks
  
Back to top
WWW  
IP Logged
 
Yuri Bond
Newbies
*
Offline


Posts: 4
Joined: Aug 19th, 2014
Re: Debugg only start once per VS2012 restart...
Reply #4 - Aug 26th, 2014 at 8:49pm
Print Post  
No Reconect does not help

I also done some test other test

If I in this state (when it does not debug) 
check Connect checkbox it does not do any debug and it does not show any messages send by arduino in serial port

But it does open serial port!
because if i try to connect to same serial port with some another serial monitor, like Arduino IDE serial monitor, it show error "can not open port"

so when visual micro serial monitor conected, it open the port 
but some how data does not go thru

I assume that i configured project correctly because when it is working, it is debuging fine 
but only one time then you need to restart VS

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


Posts: 12072
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugg only start once per VS2012 restart...
Reply #5 - Aug 26th, 2014 at 9:02pm
Print Post  
Hi Yuri,

Thanks for the info. This is not normal behavior so it is useful to work through and find the solution.

This sounds like a serial monitor issue unconnected to debug.

Please set the configuration on the tool from Debug to Release. 

Then upload a simple sketch that transmits a serial message every 250ms using serial.println()

With this configuration. Can you open and close the serial monitor without a problem and without re-start? Do the serial messages appear?

Thanks
  
Back to top
WWW  
IP Logged
 
Yuri Bond
Newbies
*
Offline


Posts: 4
Joined: Aug 19th, 2014
Re: Debugg only start once per VS2012 restart...
Reply #6 - Aug 28th, 2014 at 7:49pm
Print Post  
I try this simple program

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    if (millis() % 250 == 0)
    {
        Serial.println("hello");
    }
}

Same thing 
First time everything is ok. Debug and Serial.println messages.

Hit Stop button, hit F5 again 
Nothing in serial port window
Restart VS and everything work again. One time

I tryed different speeds for serial port 9600, 19200, 115200 
no difference

Also behavior of UI is different
First time after build it opens (focus) both "Serial panel" and  "Expressions" panel 
Second time after build it open only "Expressions" panel and leave focus in Output panel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12072
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugg only start once per VS2012 restart...
Reply #7 - Aug 28th, 2014 at 7:53pm
Print Post  
Okay thanks

1) Have you docked the serial window? Can you please attach a screen shot when the problem happens.

2) Please switch from "debug" to "release" and try again. Same?

Thanks

Small tip: By the way, when debug is active it forces 115200. If your sketch code shares the same serial port but uses a different speed you have to set the RemoteSpeed project property to match your code.
« Last Edit: Aug 28th, 2014 at 7:54pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint