Changes

Jump to navigation Jump to search
Typos
Line 193: Line 193:     
A careful balancing act is required here because there are a lot of entities attempting to work harmoniously here and a Pi can be a small world.
 
A careful balancing act is required here because there are a lot of entities attempting to work harmoniously here and a Pi can be a small world.
      
* The zynthian running on Pi, preferably as meaty as one can get. A Pi3 for instance will run out of resources with more recent engines.
 
* The zynthian running on Pi, preferably as meaty as one can get. A Pi3 for instance will run out of resources with more recent engines.
 
* A Separate Computer Host from where the operation is all controlled.
 
* A Separate Computer Host from where the operation is all controlled.
 
* Some extra code loaded on the remote machine that communicates with the controlling programme on the host machine.
 
* Some extra code loaded on the remote machine that communicates with the controlling programme on the host machine.
* A VNC server ( A copy of the GUI image that runs in a browser) running on the zynthian to allow the screen to be examined during debugging.  
+
* A VNC server (A copy of the GUI image that runs in a browser) running on the zynthian to allow the screen to be examined during debugging.  
* Some alterations to the launch.json file in .scode to set things up nicely.
+
* Some alterations to the launch.json file in .vscode to set things up nicely.
   −
Visual Studio Code is an excellent environment for this and it fairly effortlessly sets up most of the environment for you.
+
Visual Studio Code is an excellent environment for this and it fairly effortlessly sets up most of the environment for you.
It will need to be running on your host machine, be it Windows, Mac or Linux which could be running on a Pi. VSC runs on them all. Indeed this is being typed on a Raspberry Pi desktop machine which has VSC open and already connected to Pi4 ( zynthian-rack6.local in this exercise)  
+
It will need to be running on your host machine, be it Windows, Mac or Linux which could be running on a Pi. VSC runs on them all. Indeed this is being typed on a Raspberry Pi desktop machine which has VSC open and already connected to Pi4 (zynthian-rack6.local in this exercise). Running in the Linux subsystem on Chromebook also works (which is how riban had developed much of the recent zynthian code changes)!
    
[[File:VSC connected to zynthian.png|1200px|thumb|center]]
 
[[File:VSC connected to zynthian.png|1200px|thumb|center]]
Line 213: Line 212:  
Microsoft attempting to purloin a name. It's files and Directories and when configured as we intend to do here it's the files on the remote Pi4. What you edit here will change on the Pi we are examining.  
 
Microsoft attempting to purloin a name. It's files and Directories and when configured as we intend to do here it's the files on the remote Pi4. What you edit here will change on the Pi we are examining.  
 
=====Search=====
 
=====Search=====
It's very useful to be able to perform a word search right across the entire chunk of code you are working on. This where you do that.
+
It's very useful to be able to perform a word or phrase search right across the entire chunk of code you are working on. This where you do that.
 
=====Source Control=====
 
=====Source Control=====
It would be temping to keep all your code efforts safely backed up somewhere and if it ould give you a history of what you have done in the past that would be really useful. Welcome to GIT. It does that for you. You store the code on Github.com and VSC handles the transfer of code to and from this repository for you. It also allows you to upload your code for a Pull Request ( the ultimate accolade!) consideration for entering in to the zynthian code base, cos you are working on a your personal fork on github of the zynthian code aren't you?  
+
It would be temping to keep all your code efforts safely backed up somewhere and if it could give you a history of what you have done in the past that would be really useful. Welcome to ''git''. It does that for you. You store the code on github.com and VSC handles the transfer of code to and from this repository for you. It also allows you to upload your code for a Pull Request (the ultimate accolade!) consideration for entering in to the zynthian code base, because you are working on a your personal fork on github of the zynthian code, aren't you?  
 
=====Run & Debug=====
 
=====Run & Debug=====
 
This is where we start the code examination and debugging sessions.  
 
This is where we start the code examination and debugging sessions.  
We don't start the zynthian up with the debugger running as you might suspect, it's a little bit more contrived than that. But we will explain the current (09/04/2024) dance below...
+
We don't start the zynthian up with the debugger running as you might suspect, it's a little bit more contrived than that. But we will explain the current (2024-09-04) dance below...
   −
The actual controls to run the debugger are in the little window floating up at the top right of the screen. THE VSC documentation [https://code.visualstudio.com/Docs/editor/debugging is here...]
+
The actual controls to run the debugger are in the little window floating up at the top right of the screen. The VSC documentation [https://code.visualstudio.com/Docs/editor/debugging is here...]
    
=====Extensions=====
 
=====Extensions=====
   −
Chunks of code written by many contributors including Microsoft themselves that allow extra functionality to be loaded into VSC. The debugger itself is one such component as is the Remote Access mechanism and an extension to Work intelligently with Python code.
+
Chunks of code written by many contributors including Microsoft themselves that allow extra functionality to be loaded into VSC. The debugger itself is one such component, as is the Remote Access mechanism and an extension to work intelligently with Python code.
 
=====Remote Explorer=====
 
=====Remote Explorer=====
access to the Remote Machine
+
Access to the Remote Machine
    
=====Testing=====
 
=====Testing=====
   
Testing Module. I've not had a lot of success with this.
 
Testing Module. I've not had a lot of success with this.
   Line 235: Line 233:  
Microsofts domain control
 
Microsofts domain control
 
=====Manage=====
 
=====Manage=====
   
Admin Tasks
 
Admin Tasks
    
====What should I do before starting VSC for debugging?====
 
====What should I do before starting VSC for debugging?====
 
+
Check the VNC connection from your host machine's browser to the zynthian, by selecting VNC.
Check the VNC connection from your Host machine's browser to the zynthian , by selecting VNC
      
====How do I set up VSC to use the debugger?====
 
====How do I set up VSC to use the debugger?====
Line 286: Line 282:     
====How do I stop the zynthian from within VSC?====
 
====How do I stop the zynthian from within VSC?====
   
Once you have a remote terminal within VSC running you type
 
Once you have a remote terminal within VSC running you type
 
systemctl stop zynthian.   
 
systemctl stop zynthian.   
Line 301: Line 296:     
====How do I actually start the VSC Debugger?====
 
====How do I actually start the VSC Debugger?====
   
Simply press the Debug Green Arrow  button
 
Simply press the Debug Green Arrow  button
   Line 307: Line 301:     
==== How do I tell the world about my contribution...? ====
 
==== How do I tell the world about my contribution...? ====
   
You put it on Github because that is where the zynthian software itself resides ...
 
You put it on Github because that is where the zynthian software itself resides ...
   Line 317: Line 310:     
==== How do I submit a pull request...? ====
 
==== How do I submit a pull request...? ====
   
This is a concept within the github environment, and to do that you need to have an account at github yourself. So you need to dance your way throu their act of anointing ([http://www.github.com www.github.com]).
 
This is a concept within the github environment, and to do that you need to have an account at github yourself. So you need to dance your way throu their act of anointing ([http://www.github.com www.github.com]).
  
511

edits

Navigation menu