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 Fixed: Code compile error links in output window are wrong (Read 5379 times)
scott
Newbies
*
Offline


Posts: 6
Location: Farnborough,Hampshire
Joined: Jul 26th, 2012
Fixed: Code compile error links in output window are wrong
Jul 26th, 2012 at 4:46pm
Print Post  
This may be a Win7 thing, but the error links in my output window take me to the temp files not the project files. If I make changes there, they get overridden as soon as I hit build. This is annoying as this is the easiest way to find and fix simple errors. Can this be fixed? 
In the errors window the links work and go to my project files not the temp ones but the error description is not as good as in the output window.
« Last Edit: Oct 25th, 2012 at 1:24am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compile error links in output window are wrong
Reply #1 - Jul 26th, 2012 at 6:06pm
Print Post  
Hi Scott,

Yes this area does need some work but is better in the most recent version. Which version of vm are you running? You can find the version in "tools>options>visual Micro>version"

This might help for now: The temp version of a .pde/ino will be .cpp. So that is one thing to watch for. Also when the document opens for edit it should also highlight the document name in the solution explorer. So if an item in the solution explorer isn't highlighted when you are editing code you will know it's in the wrong place.

If you do have temp files open and you compile vs will give you a warning to tell you the code has altered outside of vs. This is a good indicator of the problem and you can always select no to the "reload" option which will prevent your changes from being lost.

For errors in library sources you can use "Project>Show All>Arduino Files". This will include all the lib sources in the project and thus it will be very obvious if a temp or real source file is open.

Finally the next version due soon fixes a bug in the compiler cache. VM was not detecting changes to #defines when  compiling projects with libraries that depend on #defines. Arducopter certainly has this type of syntax so I would set "Tools>Options>Visual Micro>Compiler>Optimise Libraries" to False in the current release to avoid additional confusion.
 
A final alternative is to open the arduino ide and set the "External Editor" to ON, in the preferences. Then open the arducopter sketch in arduino and will notice it opens in readonly mode. You will be able to edit in VS and compile in Arduino. The external editor option forces arduino to reload before compile, so the changes you make in vs will be automatically detected and used. The arduino errors might be better for nwo?It's up to you.

Let me know which options you go with. Thanks
« Last Edit: Jul 26th, 2012 at 6:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
scott
Newbies
*
Offline


Posts: 6
Location: Farnborough,Hampshire
Joined: Jul 26th, 2012
Re: Code compile error links in output window are wrong
Reply #2 - Jul 26th, 2012 at 7:17pm
Print Post  
I'm using version 1.1219 BETA.
Yeah I saw that issue in another post, thanks for the tip, I'll go with the VM setting for now. I'd much rather avoid using Aurdino where possible, I'm a C++ coder by day so prefer VS. I've been building Arduino code in VS for a while just using some additional headers but Visual Micro is a way better solution. It's so natural, but the error thing is annoying since I can't help but fall back into the habit of clicking, fixing, rebuild then I remember and have to redo the changes. Even if you say keep the changes it wont update the actual files so eventually I'd come a cropper.

On another note what is the deal with debugging? You only realise how much help it is when you can use it! I hate not being able to debug on Arduino. For a while I refused to use it altogether just because of that, but I caved. I was playing with AVR32s and a RTOS, but hopefully Arduino will have that with in a year anyway, so not loosing much.
There are debug options but nothing seems to work, I'm assuming its extra but can't find any details on your web other than the video (not really looked that hard). If its still in beta I'd be interested in testing it.

So far, I rate Visual Micro. Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compile error links in output window are wrong
Reply #3 - Jul 26th, 2012 at 9:19pm
Print Post  
Thanks for the message it is good to hear that.

I also gave up with arduino for a while for the same reasons then I decided to have a go at making an addin.

I'll try to add a switch on the next version that optionally shows you the actual errors that are returned from the gcc compiler. I might need some help working out how to read the errors whilst preserving the line numbers. It would be nice to get this right, I also find it a pain!

Making the addin and running the sites has taken a lot of time. To fund the project I was faced with charging $10 or making an optional upgrade that might cost a little but not much more. So I decided to try creating a "sort of" debugger to help speed up arduino development. So it will probably be sold at a small charge when it is released.

I'm not looking to get rich from it and I am happy for people who can help or communicate ideas to beta it and if its any good then to tell others about it Smiley 

I'll send you an email, the video on the vm site is boring but the best overview so far. There are also some crude documents on the visualmicro.com wiki "debug" section.

I'm keen to hear how you get on debugging arducopter and which transport method you end up using (project properties). The default is HardwareSerial on Serial. For Arucopter you would at least need to set the Transport to FastSerial. 

I've been meaning to try the SoftwareSerial on some spare apm pins. Hint hint.

I have to say this...

Don't forget that it's an early beta and that it attempts to add breakpoint and trace commands to the temp source code files just prior to compilation. You should become very familiar with what it is doing before using it with props on any flying vehicle. Obviously, it's provided without warranty or responsibility on my part.

ps: Don't switch on break/pause until you have experimented with the difference trace and expression watch options.
« Last Edit: Jul 26th, 2012 at 9:21pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compile error links in output window are wrong
Reply #4 - Oct 25th, 2012 at 1:23am
Print Post  
Erm? Did I forget to send you the instructions for the beta debug upgrade?

By the way this was fixed in the August release
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint