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] 2  Send TopicPrint
Hot Topic (More than 8 Replies) Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR) (Read 7813 times)
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Mar 19th, 2021 at 12:59pm
Print Post  
I face the same problem as Chris. 

Suddenly my GDBStub project on my Arduino Nano board starts to pop up with the same message as described here. It used to work before so actually I am a bit confused here.

Before I have never faced miDebuggerPath and still I haven't any knowledge on this. From the post here I have searched for and found the file searched for and found the file : debugger_launch.json on my disc. But as my project is set up to GDB Stub (see the picture below) this file shouldn't be of any interest in my case I suppose.
 
If I set the Hardware to Manual/Custom in my project I got antoher error : Unable to start debugging. Launch options string provided by the project is invalid. The string is null or empty. 

If you could come up with a 2 line explanation of the miDebbuggerPath issue, it would be much appreciated. Perhaps even a suggestion on what setup in a system could possible have damaged something regarding miDebuggerPath.
« Last Edit: Mar 19th, 2021 at 1:10pm by Simon@Visual Micro »  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #1 - Mar 19th, 2021 at 1:14pm
Print Post  
Thanks for the report. The error itself can be for a number of reasons from incorrect configuration, to missing files.

To help us investigate please enable the below options:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose


Then Run the below operations:
  • Build > Clean Solution
  • Then Run Debug > Start Debugging


Once the debugger has failed, please attach the complete output from the Output Window > Micro Build as a text file.

We will be able to understand what is happening in detail, and advise as to the fix for the issue.


« Last Edit: Mar 19th, 2021 at 1:14pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #2 - Mar 19th, 2021 at 5:10pm
Print Post  
Ok. I have done the steps you asked for and have attached the text file to this message. 

Having a quick look at this file myself, it seems to me that the MiDebuggerpath is not correct. But actually I can't remember, if I have set this us at some point working with this issue.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #3 - Mar 24th, 2021 at 12:20pm
Print Post  
Any news on this issue ???
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #4 - Mar 24th, 2021 at 1:11pm
Print Post  
After reviewing this is likely an issue with the GDB exe not being included in the board package.

Can you try updating Visual Micro to the latest version, and retry the process as before?
(attach the log again if it fails so we can see any other issues)
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #5 - Mar 28th, 2021 at 9:59pm
Print Post  
I have now updated Visual Micro to the latest version. And the error I have described before has now disappeared. 
Though the error descived in another post in the forum here is now popping up (https://www.visualmicro.com/forums/YaBB.pl?num=1616340990).
I have attached the text file you are asking for in my message here.
  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #6 - Mar 29th, 2021 at 9:52am
Print Post  
Thanks for the detail.

Can you confirm all the additions for the GDBStub library are still there (header, debug_init(). breakpoint()?

Is there any further shown in the Output > Debug Window when this error happens?
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #7 - Mar 29th, 2021 at 10:07am
Print Post  
I have followed the guide you have provided at this URL : https://www.visualmicro.com/page/AVR-Debugging.aspx
So in top of my *.ino file I have included these 2 header files :
 
#include <avr8-stub.h>
#include <app_api.h>

In my setup function I have this code added as the first statement :
debug_init();

In my loop function I have this code added as the first statement : 
breakpoint();

I have added the output from the Output -> Debug Window in the attached file.

  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #8 - Mar 29th, 2021 at 10:17am
Print Post  
Thanks for confirming, and the detail.

Do you get the same result whether you are using both "Debug > Start Debugging" and "Debug > Attach to Process" ?
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #9 - Mar 29th, 2021 at 12:31pm
Print Post  
Yes I got the same result on both options.

I have added the output from Output-> Debug Window, when attaching to Process. As can be seen, the content of this file is exactly the same as the content of the file in my last post. 

I was thinking if I should try to Uininstall Visual Micro from Visual Studio and install it again afterward. I have tried some different development platforms here lately so my overview is a bit unclear. But I am nearly 100% sure, that I had this setup here working at some point down the line. 

Another thought. I am using an Arduino Nano board to test on and have choosen an : Atmega328P (Old Bootloader) as my device. Could it be something with this. I have other boards I could try, fx, some AtMega168 boards.
  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #10 - Mar 29th, 2021 at 12:41pm
Print Post  
Thanks for confirming and the additional information.

The same sketch should also run on an Uno if you have one?

A re-install may help, however it seems all files are present and in the right place/versions from the logs so far. Trying a different board may show it is all working and as you say there is another issue involved.
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #11 - Mar 30th, 2021 at 10:48am
Print Post  
Ok. I will start trying with another board.
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #12 - Mar 30th, 2021 at 12:48pm
Print Post  
Hi again
I have now tried one of my ArMega168 boards. Unfortunately with the same result as I got when using my Arduino Nano board. 
A point of interest though. I found out that for both boards (AtMega168 and Arduino Nano) the SW seems to reset when the statement  : breakpoint(); in top of the loop function is reached. 
When removing this instruction for both projetcs, the SW runs as expected (the Internal LED is blinking).
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #13 - Mar 30th, 2021 at 1:22pm
Print Post  
Thanks for the update.

The software should halt when it reaches the breakpoint() statement, but it clearly isn't connecting to the debugger correctly.

I should have noted before this likely won't work on a Atmega168 as the library GitHub page states "Works for Arduino Uno and Nano (ATmega328) and Arduino Mega."

The vMicro Serial Debugger may be a better option at present as this will work, with additional features such as @Plot charting, conditional breakpoints, unlimited breakpoints etc..
https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-Walkthrough-Start...
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #14 - Mar 30th, 2021 at 4:15pm
Print Post  
Ok regarding the AtMega168 devices. We actually plan to fade these devices out in the nearest future, so that wouldn't be any problem for us. 
I have just tried the Serial debugging mode now just for the purpose. And of course compared to not having any debugging possibilities at all, this is a step in the right direction. 
Still though we aim for the GDB debugging possibilities. This is due to the facts that :

1) It is possible to single step through a program
2) Value of Variables can be watched
3) The one breakpoint you can set (tested on a NodeMCU 8266 device, I don't know if more breakpoints can be set on other devices) is moveable, without needing to download the code again.

So the "only" difference, as I see it with my knowledge at this moment, when comparing GDB Debugging with JTag debugging is the options being able to set more than one breakpoint when using a JTag debugger.   

Actually we plan to replace all out current devices with ES32 devices and using JTag debuggers with these devices. I don't hve any JTAg debugger for the one ESP32 device I have right now, so I don't have any possibilities to test debugging capabilities at my own PC. But as far as I can see it from Youtube videos and your own videos, it should be quite easy to get this setup up running. And is it also correct understood, that it is not possbile to use GDB Debugging, when working with ESO32 devices. Here you should have a JTag debugger at hand, if you want to use HW debugging ?

Though we aim for the ESP32 devices, still I will very much like to have the GDB Debugging for the Arduino Nano working. I actually need a working demo for this device to convince my colleagues, that Visual Micro is the tool we should choose. 
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #15 - Mar 30th, 2021 at 6:52pm
Print Post  
Thanks for the update.

Do you find the GDB Stub behaviour is any different on the Nano if you change to the non-OldBootloader board option? (and burn the bootloader of course)

If you need GDB Debugging there is the option of using the Native Atmel Studio debugging with Visual Micro, and this often means changing fuse bits on e.g. ATMega 168/328.

The Serial debugger offers many benefits over GDB:
No optimization issues inspecting variables, no dramatic loss of processing speed, > 1 breakpoint, conditional trace/breaks, performance monitoring etc..

To use GDB on ESP32 you will need an external debugger, unless you purchase the DEVKIT board which has one built in.
  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #16 - Mar 31st, 2021 at 9:30am
Print Post  
I had to switch back to my Arduino Uno board due to the fact, that I have a problem uploading the new  optiboot_atmega328,hex file from the Arduino IDE packages to my Arduino Nano board.
Doing this and still having the Device in visual Micro selected as : Atmega328P (Arduino Nano) I am able to upload my small code example to the board in Visual Micro and I am able to get the GDB Debugger up running to a certain point. When the breakpint statement in top of my loop functions is excuted, I receive a Trace/breakpint trap error. I can run/step from here, but it seems like a variable im at testing on in the watch window is only updated every second time.   
The problem is the same if I chosse Arduino Uno as device.

I have attached the output from the Debug window to this post.   

  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #17 - Mar 31st, 2021 at 10:19am
Print Post  
Is your code still the NumberOfTimesInLoop++ on two consecutive lines as shown in the first image?

If you execute another instruction between these it updates when stepping as expected, and believe its the compiler combining the operations.

e.g.
Code
Select All
void loop() {
    breakpoint();
    NumberOfTimesInLoop++;
    digitalWrite(13, HIGH);
    NumberOfTimesInLoop++;
} 


  
Back to top
 
IP Logged
 
smal
Junior Member
**
Offline


Posts: 23
Joined: Mar 17th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #18 - Mar 31st, 2021 at 11:00am
Print Post  
Yes it is still the code updating the variable on two consecutive lines. 
But I "made a small mistake" here concerning the variable NumberOfTimesInLoop. I discovered this having a closer look at my small piece of code. If I declare the variable as being volatile, I can see the variabel update in the Watch window on each statement updating the variable.

So the only problem left is the one with the Trace/Breakpoint error. If this can be solved, I will be a happy manĀ  Smiley
« Last Edit: Mar 31st, 2021 at 11:05am by smal »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid (GDBStub AVR)
Reply #19 - Mar 31st, 2021 at 12:15pm
Print Post  
The breakpoint trap can be avoided by always ensure you have a breakpoint set before starting debugging.

From using the stub more today I'm not sure you can run with no breakpoints at all and then add one. When none are set the breakpoint() method forces one in to my knowledge, but as there is no break in VS it is seen as unhandled.

This is down to the GDB Stub software library in use to my knowledge, and external hardware debuggers do not have these hardcoded breakpoints as we do in this software implementation.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint