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 The serial debugger was delayd waiting for an incoming line of data (Read 196 times)
CeSinge
Newbies
*
Offline


Posts: 8
Location: Brussels, Belgium
Joined: Nov 13th, 2014
The serial debugger was delayd waiting for an incoming line of data
Jul 29th, 2025 at 9:17pm
Print Post  
Hello,

I'm fairly new to VisualMicro, and have this message all the time no matter what I do in the Output window, and even for a trivial program of 15 lines. Some even more trivial programs do not have this issue, however, but I can't make out what does trigger this or what not.

It starts at the very beginning of the void loop(): the loop just contains an if, and within it a switch with just a few lines for each press of the button.

Some details:
- ATMega 2560 correctly working at 115200 bps on COM4 - no other interface involved.
- It is just lighting a few LEDs based on the push of a button
- there are a few trace/breakpoints
- The bounce2 library is loaded, but I commented out every line referring to it
- the port monitor is open, set to 115200, but says otherwise nothing special
- the VM Debugger dropdown is set to 115200 as well
- the is no serial.print or serial.whatever() anywhere
- the program compiles and works fine, bar for that message

There was one thread about this in 2020, but it doesn't really explain what the cause of this issue is.
The message also says 'Use WhenHit>=millis to limit the data rate'... Do I have to insert that in every sketch? And where then?

Read the docs and Googled to no avail...
Than you !  Smiley
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2758
Joined: Feb 13th, 2019
Re: The serial debugger was delayd waiting for an incoming line of data
Reply #1 - Jul 30th, 2025 at 8:54am
Print Post  
Thanks for the report.

So we can investigate this further can you attach the complete build output with the below settings enabled:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties


If possible please ZIP the whole project (excluding the ".vs" folder) and either attach it here or email it to us so we can run the exact same setup?

The error means that something is preventing the initial start packet from the Serial Debugger from reaching the PC...
  
Back to top
IP Logged
 
CeSinge
Newbies
*
Offline


Posts: 8
Location: Brussels, Belgium
Joined: Nov 13th, 2014
Re: The serial debugger was delayd waiting for an incoming line of data
Reply #2 - Jul 30th, 2025 at 5:48pm
Print Post  
Hello,

I double checked; settings set as requested.

The zip file now contains
  • the txt file that contains the output window/Micro Build and /Debug Trace - both are in the same text file.
  • the whole solution folder without any modification, except for not including the .vs folder   


In the source of the sketch, the first small part, all commented out, is an initial version and that works without the error message. The actual uncommented part is a mini sketch that allows to progressively turn on 1-2-3-4-5 LEDs on the repeated push of a button.

Thank you,
« Last Edit: Jul 30th, 2025 at 5:49pm by CeSinge »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2758
Joined: Feb 13th, 2019
Re: The serial debugger was delayd waiting for an incoming line of data
Reply #3 - Jul 31st, 2025 at 9:50am
Print Post  
Thanks for the files and details.

From the breakpoint settings and code, all of the Breakpoints seem to be disabled.  This is why the Serial Debugger is showing the message as it starts up, but then never receives any information from a break/trace point in the sketch (and after 3s it begins to print the message).

If you enable the breakpoint on line 77, then this will begin to behave as expected.

Also note that the Serial Debuggers' breakpoints are added at the end of a line of code, so when used on an If statement it will only hit the breakpoint when the if condition is passed.

Also on line 79 you have a one line if statement with no curly braces, with a breakpoint set
Code (C++)
Select All
if (ButtonValue == LOW) PrevButtonValue = LOW; 



Which when executed would essentially be:
Code (C++)
Select All
if (ButtonValue == LOW)
    PrevButtonValue = LOW;
// > Breakpoint is really here, and outside of the "if" altogether 



Let me know if this needs explaining more clearly, or if you need any further assistance.
« Last Edit: Jul 31st, 2025 at 9:50am by Simon@Visual Micro »  
Back to top
IP Logged
 
CeSinge
Newbies
*
Offline


Posts: 8
Location: Brussels, Belgium
Joined: Nov 13th, 2014
Re: The serial debugger was delayd waiting for an incoming line of data
Reply #4 - Jul 31st, 2025 at 9:48pm
Print Post  
OK, thank you for clarifying ! This is then really easy to fix! 

For those hitting this thread, I then noted the following:
  • There must be at least one active breakpoint in the void loop(), or no breakpoint defined at all;
  • The first active breakpoint must not be a comment;
  • There can be disabled breakpoint before the active one;
  • I might be wrong, but if you have (active) breakpoints, they better get hit quickly or VisualMicro gets impatient and shows the message. So an active breakpoint somewhere in an if or case that only rarely gets hit will not do the trick and you'll have the message all over the place - that's a bit of an annoyance because it's usually what one does;
  • But then, you can set a tracepoint and check Continue code execution - this also suppresses the error message. For a tracepoint to work, at leastsomething must be filled in the Show a message box.
  • And you cannot turn off the debugger as long as there are debug points - active or not - in the sketch as you have to be in a Release configuration for that.

That's a bit what I could find.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint