DevelopmentVSCode

From VentureResearchWiki
Jump to navigation Jump to search

Linux Development with VS Code[edit | edit source]

Minidev Login setup[edit | edit source]

  • Setup a key on your PC, and copy it to minidev. https://code.visualstudio.com/docs/remote/troubleshooting#_configuring-key-based-authentication
  • In powershell:
    • ssh-keygen -t rsa -b 4096
    • $USER_AT_HOST="kevinb@minidev"
    • $PUBKEYPATH="$HOME\.ssh\id_rsa.pub"
    • $pubKey=(Get-Content "$PUBKEYPATH" | Out-String); ssh "$USER_AT_HOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '${pubKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
  • Make sure you can login without a password:
    • ssh kevinb@minidev
  • Make sure you have the SVN directory checked out locally. Usually this is in $HOME/svn/vr/linux.

VS Code Setup[edit | edit source]

Following this article: https://code.visualstudio.com/docs/remote/ssh

Other[edit | edit source]

Setup Intellisense. First time run gtags at project root:

gtags

(needed?)

Building Code[edit | edit source]

Terminal -> Run Build Task. Will run 'make' DevelopmentVSCode Build2.png

Debugging[edit | edit source]

To debug the application, use 'F5' or click 'Start Debugging'. This will run a new version of the RFID service. DevelopmentVSCode Run.png


DevelopmentVSCode Run Terminal.png

Note that breakpoints and debugging also work really well.

Troubleshooting[edit | edit source]

If you get an error like:

DevelopmentVSCode RunError.png

Then open a .c file so that it knows what to do.