Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> GDB Debugging >> Action Breakpoint jumps to next string
https://www.visualmicro.com/forums/YaBB.pl?num=1566048412

Message started by Kabron on Aug 17th, 2019 at 2:26pm

Title: Action Breakpoint jumps to next string
Post by Kabron on Aug 17th, 2019 at 2:26pm
On starting debug session Action Breakpoint suddenly jumps to another string and error message occured.

Code (]
Breakpoint 2, loop () at D:\Arduino\Proj\ESP32\M5Stack\MAX30102\RD117_ARDUINO/RD117_ARDUINO.ino:119
119          Serial.print(aun_red_buffer[i):

, DEC);
1133823549-var-create: unable to create variable object
-var-create: unable to create variable object
@"Target halted. PRO_CPU: PC=0x400EDE22             APP_CPU: PC=0x400D0D96 (active)\n"

Before.jpg (53 KB | 2 )
After.jpg (63 KB | 2 )

Title: Re: Action Breakpoint jumps to next string
Post by Visual Micro on Aug 17th, 2019 at 5:03pm
What do you click to start debugging?

What optimization setting have you got set/disabled?

Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 17th, 2019 at 5:08pm
1. F5
2. No optimization

Title: Re: Action Breakpoint jumps to next string
Post by Visual Micro on Aug 17th, 2019 at 5:27pm
Thanks, can you please email the RD117_ARDUINO\RD117_ARDUINO.cpp fro the temp build folder to the address in the yellow box.

The temp build folder can be seen when verbose output or "show build folder" is enabled.


Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 17th, 2019 at 5:36pm
Done

Title: Re: Action Breakpoint jumps to next string
Post by Visual Micro on Aug 17th, 2019 at 5:40pm
Thanks, sorry I need the matching .ino file as well.

Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 18th, 2019 at 7:16am
Done.
One more strange thing:
There is no loop() function in function list

Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 18th, 2019 at 11:18am
Generally, I tried to follow "Drawing Graphs Using @Plot Windows" article directions.
Finally I made separate test project, similar that in article:

Code (c++):
#define apin 35
#define DACĀ  25

void setup()
{
     Serial.begin(115200);
}
//{@Plot.MyWindow.Sensor sensorValue}
void loop()
{
     int sensorValue = analogRead(apin);
     float voltage = sensorValue*2.0;
     dacWrite(DAC, voltage);
}


and obtained the same results:
jumping to next line and
-var-create: unable to create variable object

Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 18th, 2019 at 11:31am
Definitely it related with debug mode. It works with serial debug and do not with hardware GDB.
I found maybe similar issue:
  https://sysprogs.com/w/forums/topic/var-create-unable-to-create-variable-object/

Title: Re: Action Breakpoint jumps to next string
Post by Visual Micro on Aug 18th, 2019 at 12:21pm
Hi,

I suspect that in GDB mode line numbers are confused because you have added an include for Arduino.h to your code. We will fix that bug in the next release, for now I suggest you remove the #include because it is not needed.

#include <Arduino.h>

Thanks

Title: Re: Action Breakpoint jumps to next string
Post by Kabron on Aug 18th, 2019 at 12:46pm
There is no #include <Arduino.h> in the test project. But  symptoms remains.

Title: Re: Action Breakpoint jumps to next string
Post by Visual Micro on Aug 18th, 2019 at 6:36pm
I have made some tests and the issue seems related to the tool chain or hardware you are using. We are not seeing the problem with any of our tests.

Please provide the info in the yellow box above so we can see what you are working with.

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.