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
Hot Topic (More than 8 Replies) Debug problem with RFduino (Read 14765 times)
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Debug problem with RFduino
Jul 24th, 2014 at 6:07pm
Print Post  
I am unable to debug with an RFduino however I can compile, upload binary and serial monitor.

Please can you advise.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #1 - Jul 24th, 2014 at 6:18pm
Print Post  
Hi

If your sketch is using the serial port at a speed other than 115200 you will need to set this speed in the project properties LocalSpeed

If you are using the default debugger then you will need to switch the tool bar from Release to Debug

Thanks
  
Back to top
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #2 - Jul 24th, 2014 at 6:20pm
Print Post  
Already done that.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #3 - Jul 24th, 2014 at 6:23pm
Print Post  
Hi,

Please switch on tools>options>visual micro>compiler>show build folder

Then upload with debugging (F5)

After the upload the "Micro Build" output window will contain the location of the build files.

Please zip the [sketch name].cpp and email to info[at]visualmicro.com along with a zip of your sketch folder including the Visual Micro sub folder that will have been created below the sketch folder.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #4 - Jul 24th, 2014 at 6:42pm
Print Post  
Hi thanks for sending the rar of the files in the build folder. 

Can you please also send the zip of the sketch folder with the visual micro sub folder mentioned previously.

Thanks very much
  
Back to top
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #5 - Jul 24th, 2014 at 7:05pm
Print Post  
Files emailed.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #6 - Jul 24th, 2014 at 7:17pm
Print Post  
Thanks for the files. One last request.

Can you please upload a debug version then email a screen shot of your full ide window after the upload and the serial has re-started. 

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #7 - Jul 24th, 2014 at 7:50pm
Print Post  
Thanks for the 2nd image which shows the debugger is running and waiting for you to press F5 to make it continue.

The first screen shot shows the debugger started, hit one break point and continued.

Both screen shots show the debugger is running, the debugger trace has activated and populated and the expressions window has opened but you have not yet set any expressions to watch.

One thing to watch out for which has not affected you in these images but worth mentioning is that Arduino doesn;t like too many serial print statements on top of each other. I notice you set a break point on your own serial.print debug statements. This is not recommended.

So I am sorry if I am missing the point but I can't see anything wrong?

Your report is:- 

Quote:
I am unable to debug with an RFduino however I can compile, upload binary and serial monitor


But your screen images show you are already debugging your RFduino????
« Last Edit: Jul 24th, 2014 at 7:55pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #8 - Jul 24th, 2014 at 7:59pm
Print Post  
This is just a sample slap together code.

So what you are saying is I have to explicitly set a watch on the function or variable I want to track ?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #9 - Jul 24th, 2014 at 8:11pm
Print Post  
Hi,

Okay so the question is how to view expressions and variable values while the debugger is running.

Arduino does not have a debugger so Visual Micro injects serial print statements into a temp copy of the program prior to upload. For this reason it has to know which variables you want to watch.

You will find a whole bunch of useful articles in the documentation section which will help you also understand how to format the data if required.

Here is one article that shows how to build up the "When Hit" with variables/expressions and/or text messages. 

http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-Explained.html

The text messages are not compiled onto the Arduino so will not consume vast amounts of memory.

You will also see how to add conditional or timed breakpoints.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #10 - Jul 24th, 2014 at 8:34pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #11 - Jul 24th, 2014 at 8:42pm
Print Post  
Ok so I did as you said and to no avail I still am unable to see the variable values. I am beginning to think that the serial.println is maybe worth it compared to the time I have spend trying to resolve this problem.
  
Back to top
 
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #12 - Jul 24th, 2014 at 8:56pm
Print Post  
Ok apologies got it working now.

Thank you for the good support.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #13 - Jul 24th, 2014 at 9:08pm
Print Post  
Relieved  Smiley
  
Back to top
IP Logged
 
RFduino
Newbies
*
Offline


Posts: 8
Joined: Jul 24th, 2014
Re: Debug problem with RFduino
Reply #14 - Jul 24th, 2014 at 9:12pm
Print Post  
Having researched on Google your tutorial does not explain how to apply the "when hit" methodology.

This is what I discovered:

blockSize is {blockSize} and not just {blockSize) as you tutorial explained.

Now that you have made it personal my company purchased a license for your product so 30 day free trial does not apply to my company.

Once again thank you for your support and we look forward to using your product for some time to come.   

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug problem with RFduino
Reply #15 - Jul 24th, 2014 at 9:22pm
Print Post  
Hi,

Please use the Documentation link at the top of the visualmicro.com web site.

The documentation is new and not fully linked on google yet but our web site is really where you should look anyway.

This is one useful page but there are 8 pages in the debugger section

http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-With-Breakpoints.htm...

On visualmicro.com there is also a link at the top called Debug Arduino. The page provides a link to this debugger youtube video that is also of help although slightly out of date and shows the "advanced users" view of switching on debug but the rest is the same.

Having said this, the documentation is new and improving all the time. The funds earned from the debugger are pay for it.

The reason why I mentioned the personal license is that you bought the personal license (for individual/private use) but should have bought the commercial license (for commercial business's that make profit)  Undecided
« Last Edit: Jul 24th, 2014 at 9:31pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint