A Visual Debugger for DVM-DOS-TEM in Docker Container on GCP Instance #687
                  
                    
                      Benjamin-Maglio
                    
                  
                
                  started this conversation in
                Show and tell
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Approximately 6 months ago @rarutter added
/.vscodeto the repository in commit927978cwhich contained alaunch.jsonfile, enabling the use of a visual debugger in Visual Studio Code when running the model from within a Docker Container. This provides a powerful utility for debugging and development of DVM-DOS-TEM. However, as many users work primarily on cloud-based VMs, there was an extra layer of complexity to use this feature, requiring a remote-ssh into the instance, and then mounting to a running container, which we think we have solved.General vscode setup instructions for host machine to docker container (
host->docker):hostRemote-Containers:Attach to Running Container- this will list all running containersContainer dvmdostem-devetcdockercontainerMore information on debugging using this platform can be found here.
Subsequently, setup for vscode for
host->cloud-instanceas follows:hostcloud-instance(for GCP see this)cloud-instanceis running, and select this (you may need to reconfigure your .ssh config file, see this)cloud-instanceFinally, to setup the visual debugger for
host->cloud-instance->docker:cloud-instanceusing the previous steps, you will need to make some accessibility changes on thecloud-instance, you can do this in the terminal of vscode or from whichever method (browser, ssh) you normally access youcloud-instancecloud-instanceare runningsudo groupadd dockerthensudo usermod -aG docker $USERon youcloud-instance(but not insidedocker) to allow for commands to be made without being a super user (usenewgrp dockeror log out/in to activate changes)cloud-instanceremotehost, using remote-ssh to accesscloud-instanceand attached todockercontainer on thecloud-instancedockeroncloud-instanceand you should be able to begin debugging as in the intial set of instructions.Note: due to the multiple ssh layers connection is slow, you may need to change the refresh rate to something longer than the default with
docker.explorerRefreshIntervalfollowing this.Beta Was this translation helpful? Give feedback.
All reactions