Changes

Jump to navigation Jump to search
Line 1: Line 1: −
'''Debugging Webconf with Visual Studio Code'''
+
== Debugging Webconf with Visual Studio Code ==
    
This is presented as an example of how a Visual Studio Code can be used to examine a component of the zynthian sub system as it runs using the Visual studio Code extensions, python & remote-ssh.
 
This is presented as an example of how a Visual Studio Code can be used to examine a component of the zynthian sub system as it runs using the Visual studio Code extensions, python & remote-ssh.
Line 13: Line 13:  
[[File:Vsc_git_graph.png|thumb|center|Zynthian git graph]]
 
[[File:Vsc_git_graph.png|thumb|center|Zynthian git graph]]
   −
'''The ssh connection'''
+
== The ssh connection ==
    
The addition of the remote component adds the Remote Explorer element  
 
The addition of the remote component adds the Remote Explorer element  
Line 22: Line 22:  
I have a zynthian called zynthian-orig.local. It's actually a genuine zynthian product running a Pi3 and no membrane switches and some fairly simplistic interface. Indeed it has to be disassembled to change the ssd. Such were the early days.!
 
I have a zynthian called zynthian-orig.local. It's actually a genuine zynthian product running a Pi3 and no membrane switches and some fairly simplistic interface. Indeed it has to be disassembled to change the ssd. Such were the early days.!
   −
[[File:Zynthian-orig.local.png|frame|center|Zynthian-orig.local]]
+
The fact that one can run this debug against the modern code is a sign of great overall consistancy.
 +
 
 +
[[File:Zynthian-orig.local.png|center|500px|Zynthian-orig.local]]
    
== Visual Studio Code Configure. ==
 
== Visual Studio Code Configure. ==
Line 36: Line 38:  
[[File:Zynthian-sys-security.png|thumb |center|800px]]
 
[[File:Zynthian-sys-security.png|thumb |center|800px]]
   −
To access this we press on the + button against the appropriate machine. ( images a little awry here )
+
To access this we press on the + button against the appropriate machine. Visual Studio Code keeps and manages accurate records on the ssh connections you have made. It's handling of details down to the passwords and such and it's overall willingness to just do stuff as you would expect. 
    
[[File:Vsc_remote_explorer_add_new.png|thumb|center|800px]]
 
[[File:Vsc_remote_explorer_add_new.png|thumb|center|800px]]
 +
 +
The -A option...?
 +
 +
-A Enable forwarding of the authentication agent connection.
    
[[File:Vsc_remote_explorer_dialog.png|thumb|center|800px]]
 
[[File:Vsc_remote_explorer_dialog.png|thumb|center|800px]]
    +
We enter the details for our specific zynthian machine.  Zynthian runs as root (atm). It always has done so make sure you put root in here. Many hours can be blissfully wile'd away wondering why you can see a machine you'vee loggged into as the wrong user.
 
[[File:Vsc remote explorer zynthian-orig.png|thumb|center|800px]]
 
[[File:Vsc remote explorer zynthian-orig.png|thumb|center|800px]]
   Line 113: Line 120:  
== Running the debugger in anger ... ==
 
== Running the debugger in anger ... ==
   −
[[File:Zynthian-orig running midi.png|thumb|center]]
+
So leaving with the zynthian-webconf.py module highlighted start the debugger as before.
 +
 
 +
And then go and open the lib/midi_log_handler.py page once the web server is running and highlight the line 132 by pressing to the left of the line number
 +
a red circle should appear. . .
 +
[[File:Vsc debug line 132.png|thumb|center|800px]]
 +
 
 +
Then select the midi log page within webconf and play some midi . . . .
 +
 
 +
[[File:Zynthian-orig running midi.png|thumb|center|800px]]
   −
[[File:Vsc debug line 132.png|thumb|center]]
+
The program will halt on the debug line 132, and you should be able to operate the debugger transport controls and all the nice debug tools that will display and set values.
 +
The following shows it after step over has been pressed twice. . .  
   −
[[File:Vsc debug stepover.png|thumb|center]]
+
[[File:Vsc debug stepover.png|thumb|center|800px]]
584

edits

Navigation menu