VS Arduino
Visual Micro >> Usb/Serial/WiFi Debugging >> Serial debugger stuck on "Launching debugger..."
https://www.visualmicro.com/forums/YaBB.pl?num=1590002131

Message started by Isaac on May 20th, 2020 at 7:15pm

Title: Serial debugger stuck on "Launching debugger..."
Post by Isaac on May 20th, 2020 at 7:15pm
I tried to search for other posts about this same issue but none of the threads had applicable solutions.

I have an Due. I have successfully uploaded a number of sketches. The serial output from these sketches comes through to the monitor no problem. However, I have been unable to get debugging to work. When I switch to debug mode and click build and upload, everything seems to go fine but the micro debug trace output simply shows Launching Debugger... (along with some tutorial text when I have tutorial mode on).

In order to reduce confounding factors, I'm following the debugging tutorial.

I am using the native usb port on the due.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=DebugBuildLog.txt ( 99 KB | 20 Downloads )

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Visual Micro on May 20th, 2020 at 11:30pm
If your own sketch code uses serial then please make sure you have set the speed that you use in vMicro>Debugger>RemoteSpeed. That should also change the LocalSpeed menu item to be the same.

Please also ensure the DTR on the serial monitor is enabled otherwise any breakpoints in setup() might be missed.

If those two points don't help then please confirm if you own code uses Serial.read() and an example of where you have placed a breakpoint.

Thanks


Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Isaac on May 20th, 2020 at 11:56pm
I'm trying the debugger on the "Blink without delay" example sketch which doesn't use serial at all. I set the breakpoint on the loop function declaration (as the tutorial instructed).

Since you mentioned it, DTR doesn't seem to work. Is it supposed to reset my board when I deselect and reselect 'connect'?.

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Visual Micro on May 23rd, 2020 at 12:00pm
Some boards don't use the DTR, the Native USB Port is one of them.

Bacause you are usig the native usb port on a due I think I recall that it uses Serial1 and not Serial for that port.

In that case set "vMicro>Debugger>Remote Port" to Serial1. See if that works?

(We should be detecting that and switching to Serial1 but maybe that detection is failing)




Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Isaac on May 25th, 2020 at 4:07pm
That pointed me in the right direction. Overriding the remote port to serial1 didn't work but overriding to SerialUSB did.

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Visual Micro on May 25th, 2020 at 4:35pm
Thanks, we will look into that. It should auto detect SerialUSB for that board unless you specifically set the RemotePort.


Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Simon Hopkinson on May 27th, 2020 at 7:42pm
The Latest Release (20.05.18.5) contains a fix for this issue, let us know if there are any further problems.

Previous Releases, New Releases and Notifications

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by gj on Nov 25th, 2020 at 10:04am
So, I'm having the same problem.
Using D1 mini, and a real small sketch (to exclude any software errors on my side)
VM is version 2020.910.8
VStudio Community 2019 is V16.8.2


Code (c++):

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

void loop() {
     Serial.println("*");
     delay(500);
}


Switching to an Arduino Uno works fine, so it seems it's related to the combination of the board I have and the one that I choose in the settings.
Also I have been able to upload software and run the Debugger, but for some reason that stopped working.
So, currently it sometimes works but most of the time it doesn't.
Sometimes, but not always, I get the additional message "User Experience: The serial debugger was delayed waiting for an incoming line of data. [...]"

I tried:
* Clean solution and rebuild
* DTS off and on (and also RTS)
* Serial speed down to 9600
* Use Serial1 instead of Serial
* Manually matching the Remote/Local speed in VM
* Selecting other boards in VM that seem the same (Wemos D1 R1, LOLIN(Wemos) D1 R2&mini,  LOLIN(Wemos) D1 mini Pro, LOLIN(Wemos) D1 mini Lite). Even the 'Generic ESP8266 Module'.
All to no avail

So, how to proceed?

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Simon@Visual Micro on Nov 25th, 2020 at 10:59am
Thanks for the detail.

The Serial Debugger runs by default at 115200, and the rate can be changed in the vMicro > Project Properties > Local Speed.
Doc: https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Ports.html

Can you please attach a copy of the build log with the settings as shown at the top of this page so we can investigate further?

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by gj on Nov 25th, 2020 at 3:14pm
I did change the verbose and other settings and recompiled.
However, the instruction at the top is not specific on where to find the actual log to attach.
I have a Debug-directory in the projectfolder, but that contains 16 items.
Which one to attach?  :-?

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by Simon@Visual Micro on Nov 25th, 2020 at 3:42pm
The logging is just the content from the Visual Studio Output window > Micro Build.

Title: Re: Serial debugger stuck on "Launching debugger..."
Post by gj on Nov 25th, 2020 at 5:55pm
And as always.... now it works fine both with the real project as well as the 'empty' project.  >:(.
And for all of the 3 Wemos I have....
Anyhow, the log is in the attachment (for the 'empty' project) , but I assume you won't find anything out of the ordinary...

I'll get back with another log when the problem magically re-appears.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Micro_Build_Verbose_for_project_Empty.txt ( 70 KB | 2 Downloads )

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.