Debugging and development with Visual Studio Code #104
Replies: 2 comments
-
Thanks for the interesting and useful post for people wanting to use VS Code debugger. Here are my initial comment and suggestions:
Thanks for the post, hope it is helpful to someone. |
Beta Was this translation helpful? Give feedback.
-
I made some edits as you suggested. Some of the VS Code changes I made are still "black magic" to me (especially for the I agree my "template library" example is still a bit clunky, as it's not simply a template OR a library. For example it has Thanks for the feedback. I appreciate the new perspective. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to use a debugger while adding features and running my tests. Debuggers provide much faster feedback than editing/examining
Serial.print(...)
statements with every run. As a bonus, development under Linux can skip the "download sketch" step, which can take a while for large sketches.https://github.com/philj404/EpoxyDebuggerDemo
So... this TEMPLATE/EXAMPLE library supports a Visual Studio Code workspace which can build and debug the library and its tests. To use this capability you must have the following installed:
At the top level of this library, I enter the command:
code EpoxyDebuggerDemo.code-workspace
to run VS Code. Specifying the code-workspace file helps give VS Code a base path from which to search for useful files and libraries.Interesting magic is in:
It is important to do a ("clean" and) "debug" build before using the debugger.
I have been able to clean, build, set breakpoints in a regression test, examine variables, step, and continue.
I have set up the VS Code settings to support "Debug" and "Release" configurations. Usually I use the "Debug" configuration... but "Release" will behave differently and it's also worth testing. The GitHub regression test uses the "Release" build.
Under "Makefile Tools" tab:
Warnings:
References
Beta Was this translation helpful? Give feedback.
All reactions