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) Feature Request: Enable trace/breakpoint in libraries (SOLVED) (Read 6338 times)
gj
Junior Member
**
Offline


Posts: 42
Joined: Feb 12th, 2016
Feature Request: Enable trace/breakpoint in libraries (SOLVED)
Oct 18th, 2016 at 8:04pm
Print Post  
Based on this thread: http://www.visualmicro.com/forums/YaBB.pl?num=1417714951/8#8
where it says: "Breakpoints in libraries are not support by the debugger" and also "For Arduino compilation libraries are not copied to the build folder so there is no opportunity to inject breakpoint serial code into the copy.".

Suppose the situation where you have a library (work in progress) on which multiple projects are relying.
Without the support for break/trace-points in libraries each project would need a local (in project-folder) copy of the library. Any update to the library would need to be copied to each depending project.

Would it not be possible to let the compiler recognize in which library breakpoints are set and then DO copy that particular library into the build folder. This will allow (based on the quoted statement above) the injection of breakpoints.
« Last Edit: Jan 17th, 2017 at 8:20pm by gj »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #1 - Oct 18th, 2016 at 8:33pm
Print Post  
Hi, 

Debug in libraries was released when the feature that allows local libraries to be created was released some months ago.

The best way to get started, if you have a paid version, is to use the "Add Code>Create Local Arduino Library" menu item.

This will create a new local libary which you can remove after you have inspected the folder structure where it has been located. The folder will be "_micro-api\src\libraries"

After that clicking the "Toggle hidden files" might copy the existing lib sources locally but if that doesn't work then you can copy them manually and include them in the solution explorer.

It's not ideal but a step in the right direction supporting library debug.

Hope this makes sense

ps: Please don't add notes about polls to other forum threads it causes emails to be sent to other users and visual micro emails will end up being junked. It also causes a lot of admin emails and slows me down in my ability to respond to other users.  Thanks


« Last Edit: Oct 18th, 2016 at 8:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
gj
Junior Member
**
Offline


Posts: 42
Joined: Feb 12th, 2016
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #2 - Oct 18th, 2016 at 8:39pm
Print Post  
Yeah, that is a step in the right direction, but still of limited use if a library (work in progress, multiple developers) is used by multiple projects.

As "just a (paying) user" it seems it wouldn't be hard for the compiler to check in which libraries (CPP-file) a breakpoint was added and copy that file to the build folder.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #3 - Oct 18th, 2016 at 8:42pm
Print Post  
I agree it's a consideration. The only problem is some library authors have used invalid includes in their libraries expecting other libraries to be located in a fixed location such as #include "..\otherLib\otherLib.h"

By having users with local libraries the source code is less hidden and less prone to compiler problems. However I agree that when time allows more effort will be a benefit here. 
« Last Edit: Oct 18th, 2016 at 8:44pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
gj
Junior Member
**
Offline


Posts: 42
Joined: Feb 12th, 2016
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #4 - Oct 19th, 2016 at 7:33am
Print Post  
Hmmm.. I see your issue with "crappy" libraries.
That would probably require some disclaiming to do in the documentation once this feature becomes available.

But don't you have that same problem with ino en project-directory-located cpp-files (where the programmer uses fixed locations to find his files?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #5 - Oct 19th, 2016 at 11:31am
Print Post  
All projects files are copied to temp prior to build. If users have referenced source outside of the project it will fail in both arduino ide and visual micro so it's fairly clear.

I will look at an options so some users, who understand the rules, can switch on the functionality Smiley
  
Back to top
WWW  
IP Logged
 
gj
Junior Member
**
Offline


Posts: 42
Joined: Feb 12th, 2016
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #6 - Oct 19th, 2016 at 11:43am
Print Post  
That sounds like a plan. Thanx!
  
Back to top
 
IP Logged
 
gj
Junior Member
**
Offline


Posts: 42
Joined: Feb 12th, 2016
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #7 - Jan 17th, 2017 at 8:15pm
Print Post  
You guys are great!  Cheesy
With the latest release (1701.17, Jan 16, 2017), I can now leave my libraries in the libraries folder and still be able to use breakpoints in it.
It's so good to see your regular updates working towards an even better product all the time.
And also trying to fit in feature requests from your user community.
More software-providers should do this.

Thnx, guys.  Smiley

http://www.visualmicro.com/post/2017/01/16/Arduino-Cross-Platform-Library-Develo...
« Last Edit: Jan 17th, 2017 at 8:20pm by gj »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Feature Request: Enable trace/breakpoint in libraries
Reply #8 - Jan 17th, 2017 at 8:28pm
Print Post  
That's great to hear. Thanks very much for posting an update.

A few weeks ago I discovered that Microsoft released shared projects starting with vs2015. They seem to work quite well although renaming a library is clunky. Hopefully we can add some features during the next few months to make cloning and renaming libraries a bit smoother.

You will also find that the libraries can be located anywhere, maybe as sibling folders to various projects under a source controlled solution. The initial system will try to create a lib project directly from the selected library sources. This doesn't feel exactly right when it comes to libraries below the arduino ide or hardware folders (because they are overwritten during update). So it's a hole/trap that needs plugging for less experienced users.

Question

Any ideas of what the smoothest solution would be to the last point?
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint